So the type system doesn’t feel so static.
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.的更多相关文章
- 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 ...
- 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 ...
- 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 ' ...
- 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, ...
- 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 ...
- Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute'
[TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from as ...
- 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文件( ...
- 解决:Could not load type 'System.ServiceModel.Activation.HttpModule' from assemb
解决:Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceMode ...
- 详解反射->Type.System
反射先了解 一:system.Type 获取基本信息: Type.Name //类名 Type.FullName //完整路径 Type.Namespace //空间名 public class ...
随机推荐
- idea 代码部分格式化
效果: 处理Idea使用ctrl+alt+L进行代码格式化时部分代码可以被忽略,不执行格式化功能(webstorm,phpstorm同理) 原因: 有时希望自己写的一些代码不被格式化,或者发现格式化后 ...
- 四、JVM — 类文件结构
类文件结构 一 概述 二 Class 文件结构总结 2.1 魔数 2.2 Class 文件版本 2.3 常量池 2.4 访问标志 2.5 当前类索引,父类索引与接口索引集合 2.6 字段表集合 2.7 ...
- asp.net table表格表头及列固定实现
http://blog.csdn.net/zdw_wym/article/details/48630337 在开发中常会遇到table表格中列特别多,下拉后,表头就看不见了,水平滚动后,第1.2列就看 ...
- Math、Date内置对象方法整理
Math : 内置的对象(构造函数)静态属性或静态方法. 一. Math.PI : 圆周率 ...
- Response笔记
# 今日内容 1. HTTP协议:响应消息 2. Response对象 3. ServletContext对象 ## HTTP协议: 1. 请求消息:客户端发 ...
- UEditor使用报错Cannot set property 'innerHTML' of undefined
仿用UEditor的setContent的时候报错,报错代码如下Uncaught TypeError: Cannot set property ‘innerHTML’ of undefined.调试u ...
- django基础篇02-url路由系统
django的路由系统: 一.基本用法: 1.path('index', views.index), # 通过类的方式创建url映射 2.path('home', views.Home.as_view ...
- LabWindows/CVI 下载
LabWindows/CVI 是National Instruments 公司(美国国家仪器公司,简称NI 公司)推出的交互式C 语言开发平台.LabWindows/CVI 将功能强大.使用灵活的C ...
- tr 替换或删除字符
1.命令功能 tr 从标准输入中替换,压缩间隔或者删除字符并从定向到标准输出. 2.语法格式 tr option SET1 SET2 参数 参数说明 -c 取代所有SET1中字符串 -d 删除所 ...
- Codeforces 918 括号匹配 SGdp[i][j][k]
A B C #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) ...