digitalmars.D - The road to Dart 3: A fully sound, null safe language
- ryuukk_ (11/11) Dec 08 2022 https://medium.com/dartlang/the-road-to-dart-3-afdd580fbefa
https://medium.com/dartlang/the-road-to-dart-3-afdd580fbefa Some interesting takes, reminds me of Python 3.0 I figured it would be interesting to share - Breaking Changes - Null Safety - Pattern Matching - Macros - WASM These topics seems to be omnipresent in every languages recently D 3.0 will obviously happen, this should be a great opportunity to clean things up to get ready for the decades to come
Dec 08 2022
On Thursday, 8 December 2022 at 18:03:11 UTC, ryuukk_ wrote:https://medium.com/dartlang/the-road-to-dart-3-afdd580fbefa Some interesting takes, reminds me of Python 3.0 I figured it would be interesting to share - Breaking Changes - Null Safety - Pattern Matching - Macros - WASMInteresting. Dart is one of my favorite programming languages (except for D of course), and it's my go-to language whenever doing anything related because I can't stomach Javascript and never really tried Typescript much. However the null safety features I found to be an annoyance. Same with other languages, I feel like I am fighting the language and just explicitly declaring types as nullable or forcing dereference wherever possible. Sure, you will not get a null pointer exception, but in case a null happens, parts of your code will just not execute silently. Maybe I am missing something but I was never sold on the null safety angle. Patterns look interesting. Dart doesn't have structs, so implementing basic datatypes like pairs was a pain and overly verbose. Pattern matching on class dynamic type is interesting. One might say it's an anti-pattern, on the other hand it's a pattern similar to visitor pattern, just without the usual boilerplate. Macros may be a big feature. Currently Dart relies on code generation, which comes with a lot of boilerplate code and still requires maintenance. With macros, if you could serialize/deserialize classes without any extra code, it would be a big improvement.
Dec 11 2022
On Sunday, 11 December 2022 at 19:45:09 UTC, JN wrote:On Thursday, 8 December 2022 at 18:03:11 UTC, ryuukk_ wrote:[...]Interesting. Dart is one of my favorite programming languages (except for D of course), and it's my go-to language whenever doing anything related because I can't stomach Javascript and never really tried Typescript much. However the null safety features I found to be an annoyance. Same with other languages, I feel like I am fighting the language and just explicitly declaring types as nullable or forcing dereference wherever possible. Sure, you will not get a null pointer exception, but in case a null happens, parts of your code will just not execute silently. Maybe I am missing something but I was never sold on the null safety angle. [...]like pairsCould anybody explain what it is?
Dec 13 2022
On Tuesday, 13 December 2022 at 09:34:46 UTC, Suliman wrote:On Sunday, 11 December 2022 at 19:45:09 UTC, JN wrote:Tuples, Dart 3 will support that too, you can return multiple values this way, and deconstruct them, very handy to have ``` (double x, double y) getLocation(String name) { if (name == 'Aarhus') { return (56.1629, 10.2039); } else { ... } } ```On Thursday, 8 December 2022 at 18:03:11 UTC, ryuukk_ wrote:[...]Interesting. Dart is one of my favorite programming languages (except for D of course), and it's my go-to language whenever doing anything related because I can't stomach Javascript and never really tried Typescript much. However the null safety features I found to be an annoyance. Same with other languages, I feel like I am fighting the language and just explicitly declaring types as nullable or forcing dereference wherever possible. Sure, you will not get a null pointer exception, but in case a null happens, parts of your code will just not execute silently. Maybe I am missing something but I was never sold on the null safety angle. [...]like pairsCould anybody explain what it is?
Dec 14 2022