zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    storm概述
    Mac下python路径
    Frida的安装
    Mac上安装多版本python的手工处理方式
    idea下编写shell脚本并执行
    CTF PWN专用虚拟机
    二叉树输入与存储的问题
    逆向推荐博客(持续更新)
    Kali 爬坑日记
    官宣:从windos服务器迁移到linux
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6784158.html
Copyright © 2011-2022 走看看