现代编程语言:Scala

语言核心

在线执行测试|playground

https://scastie.scala-lang.org/9Dy5HzHcTMiRuvUBFBx3lA

特性

  • Actor
    • 跑一个简单的Actor例子
    • Actor解决的问题是什么?
      • 一种对线程/进程/远程过程调用统一抽象的并行/分布式编程模型
      • 抽象处Actor这种【网络节点】,所有的节点之间,只能通过发消息/收消息来交互。网络节点之间的特点是收发消息需要序列化/反序列化+网络通信。
      • Actors (Scala) — Akka Documentation
      • The Actor Model provides a higher level of abstraction for writing concurrent and distributed systems. It alleviates the developer from having to deal with explicit locking and thread management, making it easier to write correct concurrent and parallel systems. Actors were defined in the 1973 paper by Carl Hewitt but have been popularized by the Erlang language, and used for example at Ericsson with great success to build highly concurrent and reliable telecom systems.
  • 面向对象和函数式结合
  • 类型安全
  • 面向JVM和JavaScript
posted @ 2020-12-04 10:22  ffl  阅读(191)  评论(0编辑  收藏  举报