2 ms·
That's not solved by making them implicit. Then you need to keep even more in your head!
by dllthomas 12y ago
That's not solved by making them implicit. Then you need to keep even more in your head!
- taeric 12y agoI prefer to architect the code such that it is only possibly null in one section of the code. For the rest, it should never be null. Pretty much period. Granted, this can certainly be done with optional types. So, I'm not ultimately against them. I just think they are oversold quite a lot.
- dllthomas 12y agoIt's not just that this "can be done" with optional types - this is precisely what optional types are for. And they help make sure you're never mistaken about that "pretty much". Like any tool, people can misuse it (propagating them everywhere would be an example of this, partial extraction functions would be another).
- taeric 12y agoRight, that is essentially my point. I do still hold more pessimism than I probably should, but by and large my main objection is just to the nature with which optional types are sold. They are almost like the vitamins of programming. Great for when they are really needed, probably wasting a ton of time for where many people that just found them put them to use.