Scala

Scala

 英

  • 网络斯卡拉;米兰斯卡拉;斯卡拉剧院

例句

It has always been a dream of mine to write Eclipse plug-ins in other languages like JavaScript, Groovy or Scala.

一直梦想——使用其它语言JavaScriptGroovyScala编写Eclipse插件

The list-construction operators in Scala make the return conditions for both cases quite readable and easy to understand.

Scala列表构造操作符使得情况下返回条件变得非常易于理解

In the case of XPath, you are able to use certain parts of XPath syntax directly in Scala, as it just gets translated into a function call.

XPath由于可以转换一个函数调用可以Scala直接应用XPath语法一部分

Recall that type information is often inferred in Scala (unlike Java), meaning we don't always show type annotations explicitly.

回想一下类型信息Scala经常推断出来不像Java),意味我们并不总是需要显式声明类型

You should now be prepared to read a fair bit of Scala code, but there's plenty more about the language to put in your tool belt.

现在应该准备阅读更多Scala代码但是语言仍然很多知识可以充实起来

It still wanted half an hour of sunset as he left the door of the Scala palace.

走出斯卡拉府第大门时候太阳落山半个小时

Before we begin, I'll lay out a few functional concepts that are required to understand why Scala looks and acts the way it does.

开始之前列出一些必要函数概念帮助理解为何Scala这种方式操作表现

If I am trying to develop some software that works on binary data, I don't want Scala to optimize for me behind the scenes.

如果开发软件用来操作二进数据希望Scala屏幕后面什么优化

Scala combined with Spring makes it quite easy to transparently inject services into all kind of objects instantiated at runtime.

ScalaSpring整合可以运行期轻松服务透明注入各种对象

Java programmers looking to call into Scala should also be familiar with traits as a mechanism for using Scala.

希望使用ScalaJava程序员熟悉特征作为使用Scala一种机制

But enough of the abstract overview: programmers like to see code, so let's take a look at what Scala can do.

抽象概述不够程序员喜欢代码所以我们来看一下Scala可以什么

Both Fan and Scala are trying to take software scalability to the next level, but I think we are taking different paths to get there.

FanScala企图软件扩张发展阶段我们为此采取方式不同

Using Scala just for the tests meant we got to use it in anger without impacting production code directly.

Scala测试直接影响产品代码我们怒气继续Java

Remember that the compiler can pull all sorts of tricks, just as long as the final result obeys the semantic meaning of the Scala language.

记住编译可以容纳所有技巧只要最终结果符合Scala语言语义含义即可

Scala is an attempt to incorporate functional concepts and terseness without losing the richness of the object paradigm.

Scala函数概念简洁融合同时失去对象丰富特性

Note that the return value of a get on a Scala Map is not the actual value corresponding to the passed key.

注意ScalaMapget返回实际上并不对应传递

In practice, I've never seen this happen with a trivial example so I guess we'll have to take the Scala designers' word for it.

实践没有简单示例出现这种效果所以我们只能暂且相信Scala设计者说法)。

Scala enables you to define a new construct that lies halfway between an interface and a class, called a trait.

Scala使能够定义处于接口之间新型结构称为特征trait)。

The hotel is also close to the Stock Exchange, the La Scala Opera House; and is within walking distance of shopping malls and boutiques.

酒店邻近股票交易所斯卡拉剧院LaScala),距离购物中心高级商店

The stack is made up of Rails for the front side, C, Scala and Java for the middle business layer, and MySQL for storing data.

结构Rails前端,C,ScalaJava组成中间业务使用MySQL存储数据

Tuples are not a game-changing feature, just another one of those "niceties" that makes Scala a powerful language to use.

并不是一个非常具有变革特性只不过是一个使Scala成为强大语言优秀特性

When we were learning new Scala features, we chose whether to use them based on whether the intent of the resulting code was more obvious.

我们Scala特性时候我们根据代码是不是能够明确体现实现意图决定不用

Scala's case classes and its built-in support for pattern matching model algebraic types used in many functional programming languages.

Scalacase及其内置支持模式匹配模型代数类型许多函数编程语言被使用

18th century magnificent opera house, built similarly to La Scala in Milan and San Carlos in Naples, is one of the prettiest in Europe.

18世纪宏伟歌剧院建成类似斯卡拉米兰圣卡洛斯那不勒斯欧洲漂亮一个

We ended the last chapter with a few "teaser" examples of Scala code.

我们几个撩拨性质Scala代码范例作为章节结束

This expression is actually the body of an "anonymous function" , called a function literal in Scala.

这个表达式实际上一个匿名函数函数Scala称为字面函数

You may have noticed that the compiler did not complain when the file was named upper3. scala and the object was named Upper.

可能已经注意到编译没有因为文件upper3.scalaobjectUpper抱怨

The only drawback is that the methods do not actually exist in Scala code and cannot, thus, be called by other Scala code.

惟一缺陷这些方法并不实际存在Scala代码因此其他Scala代码无法调用它们

You can see from the above example that Scala allows classes to be declared inside one another, or "nested" .

可以上面例子看到Scala允许一个定义另外一个或者成为嵌套”。

If I asked you to describe Scala in a sentence, how would that sentence look like?

如果一句话描述Scala怎么

So I can only imagine how hypnotizing those songs and anthems can be live at the Scala del Calcio.

因此只能想象置身现场这些加油赞美诗多么令人心驰神往

Since Scala enumerations are just regular objects, you could use any object with vals to indicate different "enumeration values" .

因为Scala枚举通常对象可以使用任何val对象指示不同枚举”。

Have fun with that, and let me know if you find work programming in Scala!

从中找到乐趣如果发现Scala编程工作告诉

InfoQ: So how do you think Scala will look like in 5 years in terms of the language and its surrounding ecosystem?

那么语言周边生态环境角度来看觉得Scala5什么样子呢?

Martin Odersky: The company aims to provide the best products and support for commercial and community users of Scala.

MartinOdersky公司目标Scala商业用户社区用户提供最好产品支持

Look carefully at what the scala interpreter said the first command returned, double (Int)Unit.

仔细scala解释器第一个命令返回double:(IntUnit

The only static feature the Scala language offers is (companion) objects, whose counterparts in Java are singletons.

Scala语言提供唯一一个静态特性就是对象Java等价物就是单例

The Scala compiler is easily able to infer this information, so there's no need to be redundant.

Scala编译可以轻松推断出信息所以需要多此一举

In Scala, the last expression in a function is the return value, although you can have return statements elsewhere, too.

Scala函数最后一个表达式就是返回尽管可以其它地方使用return语句

The feature uses reflection, and works not only for Scala code but just as well with Java.

特性使用反射不仅可以用于Scala代码适用Java