红联Linux门户
Linux帮助

Dart 1.9.3发布,结构化编程语言

发布时间:2015-04-27 09:09:19来源:红联作者:empast
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

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)}');
}

软件详情:https://www.dartlang.org/

下载地址:https://www.dartlang.org/downloads/

来自:开源中国社区
文章评论

共有 1 条评论

  1. wuliaosky042 于 2015-04-27 13:45:00发表:

    好像很高级的样子那样