Skip to main content

Posts

Dart 1.22: Faster tools, assert messages, covariant overrides

Dart 1.22 is now available. It introduces a sync/async union type, assert messages, covariant parameter overrides, and much more. Tool startup is now much faster. Get it now! Faster tool startup We have switched to using application snapshots for running our SDK tools like dart2js, analyzer, and pub. This improves startup performance. See the AOT compiling talk  at Dart Dev Summit 2016 for more information. Information about how to use application snapshots can be found in the SDK wiki . Here are the improved performance numbers we see with the switch. Assert messages The fail-fast  principle is crucial for building high-quality software, and assert  is the simplest way to fail fast. But until now, it wasn’t possible to attach messages to asserts, so if you wanted to make your error useful, you were forced to throw a full exception. Like this: num measureDistance(List waypoints) { if (waypoints.any((point) => point.isInaccessible)) { throw new ArgumentError('At l
Read more
Recent posts

Sound Dart and strong mode

As of the 1.19 release, Dart supports an optional mode, called strong mode , that supports stronger static typing. Strong mode helps you find bugs sooner and contributes to making Dart a sound language. To learn more about using strong mode to enable soundness, including the how, the why, and fixes for common problems you might encounter, see: Sound Dart How and why to write sound Dart code, and how to use strong mode to enable soundness. Sound Dart: FAQ A list of common questions for those who are interested in stronger static typing. Sound Dart: Fixing Common Problems How to fix errors and warnings you may encounter when writing sound Dart code.
Read more

Dart in 2016: The fastest growing programming language at Google, 2nd fastest growing in TIOBE Index

Dart was the fastest growing programming language at Google in 2016 with millions of lines of code written. It also made it to TIOBE Index Top 20 this month (see TIOBE's methodology ). It takes time to build something as ambitious as Dart and, in some ways, Dart is still in its infancy. But we're glad the hard work is starting to pay off. Many thanks to our amazing community! We're going to celebrate by ... releasing 1.22 next week (as per our usual 6 week release schedule).
Read more

Enhancing the Flutter developer experience

At the Dart Developer Summit we introduced our fast and powerful Flutter developer experience. But our ambitions don’t stop here, so we have been hard at work developing several updates that further improve the experience. Faster startup during development Hot reload means you only have to launch your app once; after that changes are simply reloaded into the running app. But even that initial launch should be really fast. Previously we used a loader application to bootstrap the device with your application sources. Thanks to recent improvements made to the reload engine inside the VM this is no longer necessary and your application will be booted immediately, and you will see the real launch experience of your app. IntelliJ improvements We have published an update to our IntelliJ plugin, version 0.1.6 that has several exciting changes : Launching the app with hot reload support (see details below) A new flutter action pane has been added on flutter.yaml files (see de
Read more

Dart 1.21: Generic Method Syntax

Dart 1.21 is now available. It introduces support for generic method syntax along with a few popular convenience features. Get it now! Generic method syntax Until now, Dart's generic support was limited to classes, such as List<T> . Dart 1.21 introduces syntax allowing type arguments on methods and functions.    T first<T>(List<T> ts) {      return ts.length == 0 ? throw new ArgumentError('Empty list!') : ts[0];    } Note the return type, T . This enables call sites to preserve type information from arguments. Try to write the same function without a type argument, and you'll see that the return type must be Object – there is no other way we can make it work on all lists. For more examples, check out the Using Generic Methods article . For even more details, the informal specification is the place to go. We've had generic methods and functions for a while in strong mode . 1.21 introduces support for generic method syntax even wit
Read more

StageXL 1.0: a chat with Bernhard Pichler

To contribute to the celebration of the recent 1.0 launch of StageXL , we had a chat with Bernhard Pichler to learn more. Here we go. --- First and foremost huge congrats on the 1.0 launch! People are already raving over it on Hacker News and Reddit . This is really a great accomplishment. I was wondering if you could start by telling us a bit about who you are? Thanks. Sure. My name is Bernhard Pichler, I'm 42 years old and I'm from Austria - you know Sound Of Music but no kangaroos. In my day job I work as a developer for a company in the gaming and betting industry. Nowadays I mostly do stuff on the backend but I used to work on the frontend in the past. That's why I still love to do computer graphics and why I work on StageXL in my spare time. How would you explain in less than 54 words, what StageXL is?  StageXL is a 2D rendering engine mainly built for casual games. Games like Farmville or Bejeweled are good examples. More people are playing this ki
Read more

Dart Strong Mode and ahead-of-time compilation

Dart is increasingly being used as a cross platform language, and on most of these platforms ahead-of-time (AOT) compilation is a key part of the development and deployment story. The dynamic nature of Dart limits the effectiveness of ahead-of-time compilation, particularly as applications scale up in size. We therefore designed Strong Mode Dart  to allow ahead-of-time compilers to generate better code by taking full advantage of the type information that programmers write. While the initial goal of Strong Mode was to enable better ahead-of-time compilation, we've also seen strong uptake of Strong Mode from users who just like the stronger static checking because of it’s ability to make writing, reading, and refactoring Dart code more reliable. The recent talk from the Dart Developer Summit gives an overview of Strong Mode: what it is, why having a sound type system is useful, and how it benefits developers by making their IDE experience better, and their errors more
Read more

AngularDart 2.1 and new Components

AngularDart  got its own dedicated team 5 months ago. Last month, we launched 2.0 final on the Dart Developer Summit. Today, we’re releasing the first minor release after that: 2.1. Since the focus of AngularDart is Productivity, Performance, Stability , there are no major breaking changes (see the changelog ) — but a lot of behind-the-scenes improvements. Your apps will get slightly smaller and faster (even relative to 2.0 which already made huge strides in size and performance since the compiled-from-TypeScript days). Many features that AngularJS had to implement for JavaScript and TypeScript are not needed in Dart (because Dart already has those features out-of-the-box). So we’re removing them from AngularDart. Renderer is deprecated in favor of plain-old dart:html . NgPlural is going away — Dart programs can use the package:intl library. New components On the Dart Developer Summit, we launched AngularDart Components  — the material design widgets Google is using  in custo
Read more

Making app development easier: Interview with Jerry Bowerman of sonarDesign

sonarDesign  is an Austin-based company that builds an exciting app platform, in Dart. Jerry Bowerman , the company’s CEO, previously worked at Sierra Online, EA Sports and LucasArts. I asked him some questions about the company’s vision… and tech stack. — Filip Hráček Why did you start sonarDesign? We believe the app store model is broken. It's a nice refinement of a 40 year old paradigm of installing and updating software. It introduces friction between the app creator and end user. The app store model served a purpose in the early days. I haven’t found anyone that actually enjoys the app-cycle (discovery, install, daily updates, deleting photos or apps to make space, etc.). The Sonar platform is a contrarian bet on the app store model. We believe for the majority of use cases, delivering apps instantly via open standards is the right model. The challenge for most app creators, however, is learning open standards, like HTML5, at the specification layer so you can deliver the
Read more

Building web apps with Firebase and Dart

Jana Moudra is one of the many developers who joined us for the Dart Summit this year. Not only was she helping organize the new, shiny Code Lab showing off the brand new AngularDart Components , she was also giving a talk on “ How to build a Dart and Firebase app in 30 mins ”. We thought it’d be great to hear more about this and we’re therefore happy to share this brief chat with Jana. --- So, Jana, this was the second time you attended the Dart Summit. We were really pleased to have you join us again this year and very thankful for all your hard work, help, and support. In the interest of people who maybe weren’t able to be at the summit this year, I was wondering if you could talk a bit about your overall impression of the event? The Dart Developer Summit was a really great event and I was really happy there. I met a lot of Dart developers, had fun and saw really nice talks on topics which interest me. I filled my personal todo list with a lots of "must try"
Read more

Dart Developer Summit 2016 Videos: Soundness, AngularDart 2.0, and the Fastest Growing Language at Google

Videos from last month’s Dart Developer Summit are up on YouTube  and we thought we’d cherry-pick the highlights for you. The summit keynote  is a summary of all the major news and of the direction the team is taking now. It’s where we announced that Dart is the fastest growing language at Google. Teams switching to Dart report up to twice the productivity and development speed of what they had previously. Next, AngularDart 2.0  was launched in a presentation  by Ferhat Buyukkokten and Matan Lurey. They showed how they made the framework’s output 40% smaller and 15% faster in the 4 months since AngularDart got its own dedicated team . They also showed our 60 fps table using setState(), and the new testing framework called NgTestBed. Later in the day, Ted Sander launched AngularDart Components  — the material design widgets Google is using in customer-facing apps like AdWords and AdSense. Hundreds of Google engineers work with these components every day. Watch the video  to le
Read more