2 min read

We recently asked whether Dart programming was dead, but news of its death might well have been exaggerated. Version 2 of the programming language has just been released, with a range of updates and changes that should cement its popularity with admirers and win new users too.

With Dart playing a big part in Google’s much-anticipated Flutter and Fuchsia projects, there’s a possibility that version 2.0 represents a brand new chapter in Dart’s life.

News of a Dart ‘reboot’ first emerged in February 2018. Anders Thorhauge Sandholm said at the time that “with Dart 2, we’ve dramatically strengthened and streamlined the type system, cleaned up the syntax, and rebuilt much of the developer tool chain from the ground up to make mobile and web development more enjoyable and productive.”

It would appear that six months later the team have finally delivered on their promise. They’ll be hoping it makes a positive impact on the language’s wider adoption.

What’s new in Dart 2.0?

There’s a whole host of changes that Dart developers will love, all of which can be found in the changelog on GitHub. Most notable is a stronger typed system, which includes runtime checks that will capture errors more effectively, and, for those developers working on Flutter, you can now create an instance of a class without using the “new” keyword.

Among other updates, other key changes to Dart include:

  • “Functions marked async now run synchronously until the first await statement. Previously, they would return to the event loop once at the top of the function body before any code runs.”
  • “Constants in the core libraries have been renamed from SCREAMING_CAPS to lowerCamelCase.”
  • “…New methods have been added to core library classes. If you implement the interfaces of these classes, you will need to implement the new methods.”

All the changes you’ll find in Dart 2.0 amount to the same thing: improving the developer experience and making the code more readable. The obvious context to all this ‘reboot’ is that Google is betting on the growth of Flutter and Fuchsia over the next few years. With these improvements, it’s possible that we’ll begin to see Dart’s fortunes changing.

CodeMentor may have called Dart the ‘worst programming language to learn in 2018’ at the start of the year, but it will be interesting to see if it’s popularity has grown by the time we hit 2019.

You can download Dart 2.0.0 for Windows, Mac, and Linux here.

Co-editor of the Packt Hub. Interested in politics, tech culture, and how software and business are changing each other.

LEAVE A REPLY

Please enter your comment!
Please enter your name here