4 ms·
It compiles to JS, ARM, and x86, for web, mobile and desktop support respectively. Also, Dart has code generation so you can write your own language features,
by satvikpendem 6y ago
It compiles to JS, ARM, and x86, for web, mobile and desktop support respectively.
Also, Dart has code generation so you can write your own language features, like the freezed package which implements algebraic data types even though Dart doesn't have them natively.
- markdog12 6y agoYeah, I'm not a huge fan of the current code gen methods. They're pretty hackish and ugly. I understand it's prob the only option right now. Need partial classes: https://github.com/kevmoo/language/blob/5a1e560bb0871f07f68206c8e39b01802290de65/working/0678%20-%20partial%20classes/feature-brainstorm.md https://github.com/kevmoo/language/blob/5a1e560bb0871f07f682...
- eat_veggies 6y agoDoes freezed feel nice in day-to-day use, or is it more of an incomplete/leaky hack? I'm planning on writing a library in Dart that implements a custom TCP protocol, and I think ADTs would be the best fit for capturing all the valid states and error conditions. I really don't want to have a bunch of nullable fields or use the visitor pattern :/ I've been tracking this issue [0] and hopefully with the release of null safety, the team will have the time to implement ADTs! [0] https://github.com/dart-lang/language/issues/349 https://github.com/dart-lang/language/issues/349