Dart 1.9 发布,异步编程无处不在 —— 用户交互,网络访问,文件 I/O。Dart 简化和增强了这些功能。
Dart 1.9 引入了 async 方法和 await 表达式,都是基于现有的 Future API。Dart 1.9 可以使用:for/while 循环,if 块和 try/catch 来管理复杂的异步交互。 之前
之后 Dart 1.9 同时引入了生成器方法 – sync* 和 async* 。
其他改进如下: enum, a long-requested feature, is now fully supported. The Dart Analyzer has moved to the Dart Analysis Server. This makes it much easier to integrate Dart source analysis into IDE’s beyond the Dart Editor (for instance, IntelliJ and Sublime). We've updated the regular expression engine for the Dart VM. It's up to 150x faster than the previous implementation. The Isolate API has now been fully implemented in the Dart VM, making it much easier to create applications that target multiple CPUs.
完整列表请看发行说明,现已提供下载。
更多内容请看这里。 |