object wb{
def main(args:Array[String]){
println("Happy everyday!DATA-CENTER!")
println(new java.util.Date())
}
object w{
def main(args:Array[String]){
println("Happy everyday!")
}
}
~
~
~

Scala集成了函数编程和对象编程的优点。

SEAMLESS JAVA INTEROP

Scala runs on the JVM, so Java and Scala stacks can be freely mixed for totally seamless integration.

TYPE INFERENCE

So the type system doesn’t feel so static. Don’t work for the type system. Let the type system work for you!

CONCURRENCY & DISTRIBUTION

Use data-parallel operations on collections, use actors for concurrency and distribution, or futures for asynchronous programming.

 

TRAITS

Combine the flexibility of Java-style interfaces with the power of classes. Think principled multiple-inheritance.

PATTERN MATCHING

Think “switch” on steroids. Match against class hierarchies, sequences, and more.

HIGHER-ORDER FUNCTIONS

Functions are first-class objects. Compose them with guaranteed type safety. Use them anywhere, pass them to anything.

So the type system doesn’t feel so static.的更多相关文章

  1. Beginning Scala study note(8) Scala Type System

    1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the h ...

  2. Could not load type 'System.Reflection.AssemblySignatureKeyAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c

    错误: Could not load type 'System.Reflection.AssemblySignatureKeyAttribute' from assembly 'mscorlib, V ...

  3. foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because 'System.Web.UI.WebControls.Table' does not contain a public definition for 'GetEnumerator'

    错误:foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because ' ...

  4. Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, ...

  5. JsonException: Max allowed object depth reached while trying to export from type System.Single

    在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type Sys ...

  6. Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'

    [TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from as ...

  7. The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name

    可以强迫部署EntityFramework.SqlServer.dll这个文件到输出目录 找到1个老外的帖子,戳这里(本人测试无效,大家有可能试一下..) 解决方案以下: 在EF的上下文代码CS文件( ...

  8. 解决:Could not load type 'System.ServiceModel.Activation.HttpModule' from assemb

    解决:Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceMode ...

  9. 详解反射->Type.System

    反射先了解 一:system.Type 获取基本信息: Type.Name   //类名 Type.FullName //完整路径 Type.Namespace //空间名 public class ...

随机推荐

  1. Kinect V2入门之数据获取步骤

    在Kinect for windows SDK2.0中,获取并处理数据源接口步骤如下: Sensor -> Source -> Reader -> Frame -> Data ...

  2. [CodePlus 2018 3 月赛] 博弈论与概率统计

    link 题意简述 小 $A$ 与小 $B$ 在玩游戏,已知小 $A$ 赢 $n$ 局,小 $B$ 赢 $m$ 局,没有平局情况,且赢加一分,输减一分,而若只有 $0$ 分仍输不扣分. 已知小 $A$ ...

  3. docker elk

    1.核心组成 ELK由Elasticsearch.Logstash和Kibana三部分组件组成: Elasticsearch是个开源分布式搜索引擎,它的特点有:分布式,零配置,自动发现,索引自动分片, ...

  4. 前端开发HTML&CSS入门——具体是做什么的

    软件开发,一提起来感觉这个感觉这个词范围很大很广,说起来也很笼统.不知所云,开发的到底是什么?或者说开发的具体内容是什么?以前我们讲软件开发主要是分前端和后端,那前端和后端又是什么那?你可以这么通俗的 ...

  5. router4.0

    https://blog.csdn.net/sinat_17775997/article/details/69218382 React Router 4.0 实现路由守卫   https://www. ...

  6. ubuntu14.04首次安装.md

    ubuntu14.04 安装后的工作 1.换软件源 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 网易163更新服务器(广东广州 ...

  7. 远程连接mysql出现1130的错误

    数据库权限不足 连接数据以后执行以下命令 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '您的数据库密码' WITH GRANT OP ...

  8. Nginx1.3.15导致Wordpress,Drupal等框架无限重定向的解决方案

    Wordpress建立的站点出现无限循环重定向问题.很多人遇到这个问题,并不是单纯Wordpress,Drupal, PHPCake等框架也都遇到同样的问题. 新版本的Nginx在收到 http:// ...

  9. nginx 安装 thinkphp5 配置

    nginx.conf server { listen ; server_name s.huailaixx.com; charset utf-; location ~ \.php { root /dat ...

  10. zookeeper之三 ZKClient客户端的使用

    ZKClient在原生API接口上进行了包装,同时在内部实现了诸如session超时重连.watcher反复注册等功能,使得zookeeper客户端繁琐的细节对开发人员透明.下面将从以下几个方面来使用 ...