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 .

LIVE broadcast of Dart founders' Google IO presentation

Posted by Seth Ladd You can watch Lars Bak and Kasper Lund's Google IO presentation LIVE on Wednesday, June 27th at 1:30PM (US/Pacific). Tune into the Google IO broadcast stream to watch the Dart project founders as they discuss the rationale behind Dart's design and its impact on web scalability and performance. They'll also present how Dart helps developers innovate by increasing their productivity without breaking backwards compatibility. This session, and the rest of the Google IO sessions, will be recorded and posted to YouTube to view later. If you're at Google IO, be sure to stop by the Chrome Office Hours to meet engineers working on Dart. We'll be there to answer your questions, and we look forward to meeting you!

Proposal to add metadata to Dart language

Posted by Peter von der Ahé Disclaimer: This is an early proposal, it is not in the Dart language spec yet. This might change or be retracted. Comments welcome! UPDATE : Join the discussion about this proposal on the Dart mailing list. Dart Metadata Level 1 We propose to add metadata in the form of constant expressions prefixed with ‘@’. For example: class Object {   …   @native int hashCode(); } In the example above, the metadata is highlighted in blue. The grammatical rule for metadata is: metadata: '@' expression ; The expression must be a constant expression. The example above assumes these additional declarations: class Native {  const Native(); } const native = const Native(); Informally, metadata can appear before a class, interface, typedef, constructor, factory, function, field, parameter, or variable declaration. For example: @metadata interface MyInterface {   @metadata var field;   @metadata get getter();   @metadata S...

New setUp/tearDown in Unit Test library

Posted by Seth Ladd Graham Wheeler, an engineer on the Dart project, announced today: Our unit tests now support setUp/tearDown functions. To use these you need to put the tests within a group(). Inside the group body, in addition to calling test() you can call setUp() and/or tearDown() with function arguments. The setUp function will be called before each test and tearDown after each test. Usually you would set these up at the start of the group: group('foo', () {   setUp(() {...});   tearDown(() {...});   test(description, () {...});   ... }); but you can interlace them differently; each test() will use the most recently set values setUp/tearDown. Whenever a new group is started these are reset. This applies for nested groups too. Nested groups do not inherit these functions or augment them; they get their own. This seemed the most flexible approach as chaining can always be done explicitly. Another new (unrelated) change is that you can now pas...

Video for a Dart Q&A before Google IO

Posted by Seth Ladd Yesterday Gilad Bracha, JJ Behrens, and myself had a fun time with a Dart Q&A. If you missed it, the video is now posted: Enjoy! As always, please join the conversation at the Dart mailing list .

New Apps view in Dart Editor

Posted by Devon Carew A new Dart Editor build is now available. Highlights for build 8948: 27 analysis issues fixed! We've added a second navigation view: the Apps view. It's application and library centric rather then file centric. Give it a whirl at Tools > Apps. The Mac and Linux SDKs now include a command-line version of the Editor's analysis engine. This can be found at dart-sdk/bin/dart_analyzer. Windows support to follow soon. The command-line debugger now works on Linux (curtesy of the VM team). In addition, both the command-line and Dartium debuggers now display captured variables. We made it a user-configurable option whether to display warnings for inferred types, and changed our semantic highlighting to emphasize variable identifiers if and only if their type cannot be inferred. The samples shipped with the editor have been updated and prettified. Various and sundry debugger bug fixes, search bug fixes, code completion ...

2 Google I/O 101 videos for Dart

Posted by Seth Ladd Google I/O is starting early this year with these two new introduction videos about the Dart project . In an Introduction to Dart with Seth Ladd , take a tour of the Dart language, libraries, and tools. Learn how this new open source project can help you scale your web programs from small scripts to large structured and modern apps. In the Dart Editor Tutorial with Devon Carew , learn how the editor helps you navigate small and large code bases and gives you the tools to feel confident scaling your code. Features like refactoring, code completion, code navigation, and semantic search are demoed in this video. As always, join the conversation at the Dart mailing list and learn more at http://dartlang.org . Thanks for trying Dart!

Dart's catch syntax revisited

Posted by Gilad Bracha We've decided to clean up the syntax of the catch clauses. The current syntax is the one place where a type annotation (or at least, what looks like a type annotation) has semantic meaning. To reduce confusion, it is desirable to make this construct be syntactically distinct. After discussion we concluded that the the syntax would be: on T catch (e, s) {...} where the catch clause is optional; it may be omitted if the variables are not needed. The stacktrace variable is optional as well. Both variables are implicitly final and implicitly typed. The type of e is T and the type of s is StackTrace (an interface yet to be defined). We also want to support a version where the on clause is elided but the catch clause is retained, which can be used as a catch-all, and is also javascript compatible: catch (e) {...} Spec Changes The required spec changes are given below, with new/changed (excluding deletions) highlighted in yellow below. I’m pleased to n...