現代編程語言: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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章