Clearly the Scala code in Listing 7 is simpler.
显然,清单7中的Scala代码更简单一些。
It should respond with the Scala version, 2.6.1-final.
它应该以Scala版本2.6.1 - final作为响应。
The scala interpreter will let you type in both methods.
Scala解释器会让你输入这两个方法。
The Scala programming language: Functional programming for the JVM.
Scala编程语言:JVM的功能性编程。
The documentation for the Scala tools and APIs are especially useful.
Scala工具和API的文档特别有用。
You compile and run such programs in one shot with the scala command.
你可以用scala命令一次性编译和运行这些程序。
Running this script with the scala command yields the following output.
用scala命令运行这段脚本会得到以下输出。
The application code will be written in the Scala programming language.
应用程序代码将用Scala编程语言编写。
The next stage was to extend the Scala compiler to apply the transforms.
下一阶段是扩展scala编译器来应用这些转换。
The easiest way to do this in the Scala Actors library is to use the !?
在ScalaActors库中,最容易的实现方法是使用 !
We'll learn more about structural types in Chapter 12, The Scala type System.
我们会在《第12章-scala类型系统》学习更多有关结构类型的内容。
We'll discuss type erasure in more detail in Chapter 12, The Scala type System.
我们会在《第12章-scala类型系统》详细讨论类型消除。
This is what the Scala compiler does, so there is nothing too tricky about this.
这是Scala编译器的工作,所以这方面没什么太复杂的事情。
Fortunately, the Scala Actors library can mimic this functionality pretty easily.
幸运的是,Scalaactors库很容易模拟这种功能。
This allows the scala plugin to provide the scala tools to build the class files.
这就允许Scalaplugin提供Scala工具来构建类文件。
This article uses the Scala programming language. Version 2.6.1 is used in the article.
本文使用了Scala编程语言,其版本为2.6.1。
Start the scala interpreter by typing scala and the return key on your command line.
我们可以通过在命令行输入scala,回车,来启动scala解释器。
The sole exception is the root of the Scala class hierarchy, Any, which has no parent.
唯一的例外是scala类层级结构中的根,Any,没有父类。
sbaz is installed in the same bin directory as the scala and scalac command-line tools.
sbaz 和scala,scalac命令行工具安装同样的bin目录下。
The Scala compiler is very modular and supports plug-ins so it was a lot easier to adapt.
Scala编译器的模块化做的非常好,并且还支持插件,因此使用起来就会容易得多。
The Scala programming language has been catching the eye of a number of developers as of late.
Scala编程语言近来抓住了很多开发者的眼球。
We are declaring a class, but the Scala runtime will only ever create one instance of Upper.
实际上我们是定义了一个class,但是Scala运行时仅会创建Upper的一个实例。
The Scala compiler is easily able to infer this information, so there's no need to be redundant.
Scala编译器可以轻松推断出该信息,所以不需要多此一举。
We found using the Scala REPL (command line) was a good way to experiment with writing Scala code.
ScalaREPL(命令行)可以用来试验scala代码,效果很不错。
All of this leads us to the real powerhouse of the Scala control construct suite: the for construct.
所有这些都引导我们来到了Scala控制结构套件的实际动力源泉:for结构。
Whenever we refer to executing a script, we mean running a scala source file with the scala command.
当我们提及执行一个脚本时,就是说用scala命令运行一个scala源文件。
The Scala model also has security issues because reference to the caller is passed with every message.
Scala模型还存在一些安全性问题,因为每条消息都传递对调用方的引用。
Scala does not allow package declarations in scripts that are executed directly with the scala interpreter.
scala不支持在直接运行于scala解释器中的脚本里加入包的声明。
We'll discuss the difference between reference and value types in the section called "the Scala type Hierarchy".
我们会在“scala类型结构”章节讨论引用类型和值类型的区别。
Using named arguments, one can selectively change values for the copied instance, as shown on the Scala website.
借助于具名参数,我们可以有选择地修改被拷贝实例的值,请参看scala站点以深入了解该主题。
应用推荐