3 ms·
"... the new keyword is now optional...". Why optional and not deprecated?
by e12e 8y ago
"... the new keyword is now optional...".
Why optional and not deprecated?
- munificent 8y agoDeprecating it is a breaking change and would make migrating code more difficult. It's like how semicolons are allowed but rarely used in Ruby, Go, etc. The style guide says to omit "new" [1], and our formatter can remove them for you [2], so the effect is that they are gone without the pain of a forced migration. [1]: https://www.dartlang.org/guides/language/effective-dart/usage#dont-use-new https://www.dartlang.org/guides/language/effective-dart/usag... [2]: https://github.com/dart-lang/dart_style https://github.com/dart-lang/dart_style