Skip to main content

Posts

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Core libraries stabilize with Dart's new M4 release

Today, we are releasing Dart SDK Milestone 4 (v0.4.7 r21548), available for immediate download . The highlights are: Core ,  collection , and async libraries are now stable. There will be no more breaking changes to these libraries. 1 Performance improved in both the dart2js compiler and the Dart VM.  Dart Editor comes with an all-new analysis engine for faster real-time feedback.  Classes can be used as mixins.  dart2js now generates more efficient code. Compared to the previous M3 release, DeltaBlue runs twice as fast and Richards runs 40% faster. The native Dart VM now runs Richards twice as fast as V8. On DeltaBlue, the VM improved by 22%. Details are available at dartlang.org/performance . Dart Editor comes with an all-new analysis engine for faster real-time feedback, code completion, refactoring, and more. For example, analyzing the content of a folder is now more than 50% faster. We also improved the Dart plugin for Sublime with syntax highl...

New Dart Editor Release with Dedicated WebGL Library

Eric Clayberg fills us in on the  release details : A new Dart Editor build is available at  www.dartlang.org/editor .  Ch anges include: New preference to disable auto-activation of code completion. Theme preview works with new analysis engine. Many performance and memory improvements with new analysis engine. Breaking Change List: Existing base64 encoder method CryptoUtils.bytesToBase64( List<int> bytes, [int lineLength]) is changed to CryptoUtils.bytesToBase64( List<int> bytes, {bool urlSafe : false, bool addLineSeparator : false}) Remove the (long deprecated) List.addLast method. Stream subscriptions are now more lenient about calling methods after canceling and resuming when not paused - it's no longer an error, it just doesn't do anything. WebGL types have been moved out of dart:html and into dart:web_gl. All WebGL prefixes have been removed (WebGLRenderingContext is now RenderingContext). dart:html’s WheelEvent.deltaX...

Enum Proposal for Dart

Gilad Bracha posted a proposal to add enums , one of the most requested features , to the Dart language.  The contents from the post: Rumor has it that people want enums in Dart. We've been looking at how to do this for a long time. We've examined all kinds of variations; the full account is, like the giant rat of Sumatra, a story the world is not yet ready to told (forgive me, Sherlock, but I couldn't resist). So, in response to popular demand (drumroll please): We plan to introduce enumerated types after the 1.0 release. Here's the current proposal: An enumerated type has the form: enum E  = id 1 , … id n ; It is a top level declaration, and introduces a class E into the surrounding scope. E may not be subclassed, implemented, mixed in or instantiated. There are exactly n instances of E, available via the static getters E.id 1 , .., E.id n  and via top level constant variables of the same names. We may want to refine this so tha...

Why Blossom is Switching to Dart

Thomas Schranz, CEO and Founder of Blossom, an online Kanban board for product teams,   explains why switching to Dart was an easy decision for his company .  We wanted to publish excerpts from Thomas Schranz's post, but had trouble figuring out what to leave out! We reproduce his post in its entirety here: We are Switching to Dart. Why? So what motivated us to switch to Dart? In this post I’ll try to answer this question and go into how I see Dart as a huge step forward for the web & mobile development ecosystem. What’s Blossom? Blossom  is a lightweight project management tool for people who craft modern mobile and web applications. It’s basically an online  Kanban  board for your product team. From a technical point of view  Blossom  is a cutting edge single-page web application with Google App Engine as the backend (JSON API). In the last few years we’ve learned a lot about building non-trivial JavaScript applications and hav...

New Dart Editor Build Prepares for Switch to New Analysis Engine

Eric Clayberg fills us in on the release details : A new Dart Editor build is available at  www.dartlang.org/editor .  Ch a nges  include: Various fixes and changes in preparation for changing over to the new analysis engine. Fix slowness in selection after unsuccessful navigation. You can use the new analysis engine now by going into Preferences, and enabling the experimental analyzer. This analyzer should become the default soon.  As always,v iew the  changelog  for the full list of changes, and to get started with the Editor see our  tutorial .

Dart Team Updates for March 2013

The Dart project continues to move forward rapidly, and  Anders Sandholm fills us in on  what members of the Dart team have been doing recently : Dart Team Updates, Mar 6 - 19 Dart language specification: Make mixins more useful (apply to arbitrary superclasses). More consistent treatment of malformed types. Examining mechanisms to suppress warnings and checked mode when needed. Liberalizing function subtyping. Develop synchronous mirror API for introspection. Dart libraries: Core: Added List.asMap remove deprecated Arrays, Date and StringBuffer.add/addAll/ addCharCodes. num.round, ceil, floor and truncate now return ints. rename xMatching to xWhere. Added Stream.periodic and rename Timer.repeating to Timer.periodic. Made argument to StringSink.writeln optional. dart:io: Started adding support for detecting and working with symbolic links. Added support for gzip encoding in the http server. Lots of ...

Why dart2js produces faster JavaScript code from Dart

The dart2js compiler, which converts Dart to JavaScript, now produces smaller and faster code thanks to its global type inferencer. By analyzing the entire program, the compiler can eliminate bailouts and redundant checks, resulting in code that runs faster on modern JavaScript engines. As evidenced by the graph below, the performance of the code generated by dart2js (the purple line) now slightly outperforms the original hand-written benchmark code (the gold line). The Dart VM, which natively runs Dart code, is the top line. High is better in this benchmark ( Dart code , JavaScript code ). Taken on 2012/03/28. From dartlang.org/performance Type inferencing helps performance Nicolas Geoffray, engineer on dart2js, has been working on the beginnings of the global type inferencer. In a recent interview ( video ) he showed examples of the original Dart code, the previously generated JavaScript code, and the new more optimized JavaScript code. Code gets smaller, faster Fo...