Hacker News new | ask | show | jobs
by satvikpendem 1729 days ago
Sound null safety is one that most languages don't have.

Also looks like they're going to include static meta-programming, so you can metaprogram at compile time rather than runtime like many languages [0]. With this, many language features can be implemented yourself rather than needing the language maintainers to do so, such as adding dataclasses or (React-like) hooks. And if the state of the art changes, the language won't need to be redesigned or more stuff bolted on, you can just swap out the old language feature (as a package) and swap in the new one.

[0] https://github.com/dart-lang/language/issues/1482

1 comments

Very cool! I'd love to see proper macros in a major language like Dart. And the proposal looks good, like a mix of Scala and Nemerle.
I'm rather impressed by nim's macro system - basically the build system contains a nim interpreter that handles the macros while still giving you compiled output.

(I wouldn't stretch to calling nim 'major' but I will say I've found it fascinating so far)