Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> how many more does it cost to use it?

The null-safe language I've used the most is Rust. It is far from the hardest part of the language to learn, but the biggest impact day-to-day is that when constructing a new object, initial values for all the non-nullable fields have to be provided all-at-once. You can't have a constructor which is passed a `this` object full of nulls then fill in all the values later, instead the object is constructed whole in a single operation.

Otherwise the explicit distinction between T and Maybe T just makes life easier.



Ironically you can do that in dart. If you declare your member late and never initialise it you can run into what amount to a null reference exception.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: