Dart 1.9.3 发布,此版本是个 bug 修复版本,改进内容如下:
dart2js: Addresses as issue with minified Javascript output with CSP enabled - r44453
Editor: Fixes accidental updating of files in the pub cache during rename refactoring - r44677
Editor: Resolves issue 23032 regarding skipped breakpoints on Windows - r44824
dart:mirrors: Fix MethodMirror.source when the method is on the first line in a script - r44957, r44976
pub: Fix for issue 23084: Pub can fail to load transformers necessary for local development - r44876
此版本现已提供下载:https://www.dartlang.org/downloads/。
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)}'); } |