可移植至 JVM 與 .NET CLR 的腳本語言 - Fantom

openkk 14年前發布 | 32K 次閱讀 Fantom 腳本/動態語言

Fantom 前身是 (Fan) 是一個基于 Java 和 .NET 平臺的編程腳本引擎,用來在運行時產生 JVM 和 .NET 平臺的字節碼,該語言是面向對象的,跟 Groovy 和 JRuby 有點類似,可通過特定的接口來集成 Java 的類庫。

示例代碼:

// Hello from Fantom!
class HelloWorld
{
  static Void main()
  {
    echo("Hello, World!")
  }
}

該語言原名叫:Fan。它具有以特性:

可移植性: 所編寫的代碼可以移植到Java VM, .NET CLR,和瀏覽器中的JavaScript

熟悉的語法:Java 和 C# 程序員會感覺Fantom的語法非常熟悉

并發:利用內置的不變性和actor模型解決并發性。

面向對象:所有類都繼承自Obj。Value types when you need the performance.

Functional Functions and closures are baked in.

Static and Dynamic Typing Don't like the extremes - take the middle of the road.

Serialization Built-in "JSON like" serialization syntax makes Fantom ideal for declarative programming too.

Elegant APIs We're quite obsessive about providing all the key features required for a standard library, but with much less surface area than the APIs found in Java or .NET.

REST URI literals and a unified namespace of resources identified with URIs.


項目主頁:http://www.baiduhome.net/lib/view/home/1325313423405

 本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!