Brendan Eich wrote:
We can defer these by deferring guards and const instance properties, and tried to do so. But IIRC at least Waldemar was not happy leaving writable instance properties usable (with default value undefined) before being initialized.

Of course, Dart allows this and discloses null on use before initialization:

class Foo {
  var a;
  Foo(a) {
    print(this.a);
    this.a = a;
  }
}
main() {
  var foo = new Foo(42);
  print('main: ' + foo.a);
}

Tested at http://dartlang.org/.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to