Thursday, September 13, 2012

Breaking change: Remove '.dynamic' from Object

Today, Dart engineer Lasse Nielsen informed the mailing list that Dynamic will be renamed to dynamic. He writes:

We will be renaming the "Dynamic" type to "dynamic", and as the first step we will remove 'dynamic' as a getter on Object in a few days. 

Code that uses "x.dynamic" can be rewritten to use the equivalent "(x as Dynamic)". 

As you might know, dynamic (as it is now called) is the stand-in type when a static type annotation is not provided.

I asked Lasse for some background on this change. He continued: "One positive thing is that all built-in identifiers and keywords are now all lower-case. It's a special type, like 'void', and not a class, so consistency might also be a point."

As always, we invite you to join the discussion on the Dart mailing list, and ask questions at Stack Overflow.