Recently released on pub: Show more releases

Latest Blog Posts

Possibilities for function overloading in compile-to-JS languages

Matan Lurey, on 27 Apr 2017
We’re constantly talking on the Dart team about how to improve the language (like non-nullable types), and one of the features that has come up informally a few times is function overloading:In some programming languages, function overloading or method overloading is the ability to create multiple methods of the same name with different implementations. Calls to an overloaded function will run a specific implementation of that function appropriate to the context of the call, allowing one function call to perform different tasks depending on context.In short, this means you can write code like this (here’s a Java example):https://medium.com/media/c96e739afd8ebf9f4863873af56e318b/hrefA quick note: This... read more

Yup, that’d be correct!

Matan Lurey, on 26 Apr 2017
Yup, that’d be correct! read more

Are Futures in Dart threads?

Matan Lurey, on 26 Apr 2017
Well, no. Dart has a single thread, or event-loop, of execution. However, commonly you’ll see a code using Future have a comment something to the effect of “// Avoid race conditions: Check for …”. What does that mean?New to futures? Read asynchronous programming: Futures on the Dart site.While Dart has a single thread of execution, it can interact with other code (Dart or otherwise, such as server-side) that runs in a separate thread. What Future<T> as an API means is simply “get a value, T, at a future point in time”. That time? It could be at the end of the microtask loop,... read more

Dart SDK and Dartium 1.23.0 Chocolatey Packages for Windows

Davy Mitchell, on 24 Apr 2017
Chocolatey is a package manager for Windows similar to Linux's apt-get, based on Microsoft's Nuget tool and Powershell scripting language. It works from the command-line and from a WPF GUI interface. You can install unmoderated versions by specifiying the install version during installation.Chocolatey has also been updated with versions 1.23.0Command line installation: choco uninstall dart-sdkchoco install -y dart-sdk -version 1.23.0To verify you have the right version on your path. dart --versionDart VM version: 1.23.0 (Fri Apr 21 03:13:00 2017) on "windows_x64"Command line installation: choco uninstall dartiumchoco install -y dartium -version 1.23.0 read more

An intro to immutability with Dart

Matan Lurey, on 24 Apr 2017
It’s impossible to deny that immutability is a hot topic in programming, especially front-end programming. Libraries like Immutable.js and other concepts like unidirectional data flow have argued it’s easier to reason about data when it doesn’t change underneath you:In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created. This is in contrast to a mutable object (changeable object), which can be modified after it is created.Well, what about Dart? We have a couple concepts that lend themselves well to immutability and immutable objects built-in, starting with the const modifier... read more