3 ms·
Clearly there's a place for null: most languages have it, most developers have no problem with it, it does represent something (lack of information). It is logi
by sklivvz1971 8y ago
Clearly there's a place for null: most languages have it, most developers have no problem with it, it does represent something (lack of information). It is logical and mathematical--I suggest you read the GEB book for tons of more info on that.
That said, people are _also_ free to experiment with null-free languages, or to avoid null. If it works for their use case, fantastic!
Just the attitude of the post is terrible. For example the user creates a sock puppet and posts a trolling/edgy question to Stack Overflow... just to see if it's toxic.
Sorry, these posts are toxic, in my opinion.
- _bxg1 8y agoYeah, it was super weird how the subject migrated from programming theory to a rant about stack overflow. On the actual topic, I think a good compromise is what typescript and I think rust do, which is, a value is only nullable if you explicitly declare it as such. It forces you to be judicious, while still allowing you the option when you need it.
- sklivvz1971 8y agoI've been trying that, but so far I don't find a big advantage, but it _is_ a bit annoying to have to annotate all types that could be null. This is to say: it could be good, or it could be another "exceptions in Java" moment