Dart 1.13 RC1 发布,此版本是第二个 RC 版本,Dart 1.13 SKD 已经准备测试,请从 dev 频道下载 1.13.0-dev.7.10。 RC1 相比 RC0,改进如下: Issue 24842: Dartium may crash in certain test scenarios Issue 24829: Parts of the Timeline class in dart:developer have been marked private Issue 24846: A small update to the changelog file to fix incorrect text 详细改进请看发行说明。 Dart是一种基于类的可选类型化编程语言,设计用于创建Web应用程序。 Google称,Dart的设计目标是为Web编程创造结构化但又富有灵活性的语言;编程方法一目了然,符合程序员的自然习惯,易于学习;能在所有浏览器 和不同环境中实现高性能。 Dart 代码以两种方式执行,一种是原生虚拟机,一种是JavaScript引擎,用编译器将Dart代码翻译成 JavaScript代码。这允许程序员在Dart中创建Web应用,编译后在任何浏览器上运行。Dart语言官网提供了名叫Dartboard的在线应 用,让感兴趣的开发者在线上编程和运行。 示例代码: class Point { Point(this.x, this.y); distanceTo(Point other) { var dx = x - other.x; var dy = y - other.y; return Math.sqrt(dx * dx + dy * dy); } var x, y; } main() { Point p = new Point(2, 3); Point q = new Point(3, 4); print('distance from p to q = ${p.distanceTo(q)}'); } Dart 1.13 RC1 发布,结构化编程语言下载地址