Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Notes from November 26 Language Design Meeting


Dart engineer Bob Nystrom has posted the notes from the November 26th language design meeting. He writes:

Kasper and Lars were out, so this was a short one:

Mixins

Gilad says mixins will not be in M2. He's going to put out an updated proposal this week with spec language and everything in it. Hopefully it won't cause too much indigestion.

What's left for M2?

Gilad says mostly minor a bugs. A few doc comment ones.

Config-specific code

Gilad has some ideas but he's not quite ready to discuss them yet. He's been thinking about the issue for 20 years. :)

Parameter type validation

I brought up that the corelib is now starting to manually validate parameter types in the body of methods using is in. For example:


num max(num a, num b) {

  if (a is! num) throw new ArgumentError(a);

  if (b is! num) throw new ArgumentError(b);

  ...

}

How do we feel about that?

Gilad says its perfectly natural. Type annotations are only signals of intent. If you want more robustness, you should validate them yourself.

Cheers!

As always, we invite you to join our Dart mailing list, ask questions on Stack Overflow, or file feature requests on dartbug.com.