4 ms·
I've never bothered to look up the hoare thing, but null as a member of all types increases the amount of time spent studying any given API (and of course, ther
by voidnullnil 5y ago
I've never bothered to look up the hoare thing, but null as a member of all types increases the amount of time spent studying any given API (and of course, there are lots of null pointer bugs from people who didn't bother to study the API sufficiently).
- throwaway894345 5y agoYeah, as previously mentioned, I fully agree that nullable pointers kind of suck and exhaustive pattern matching on enums is strictly better. I'm taking issue narrowly with abusing the "billion dollar mistake" quote to exaggerate the severity of the problem.
- voidnullnil 5y agoIt's a big problem in Java at least. In Go you have value types by default and they try to make zero a meaningful value.
- throwaway894345 5y agoIt's not a big problem when you look at the problems that plague even the most popular programming languages. At this point I can only refer you to my previous posts because I'm repeating myself. :)
- azth 5y agoWhich problems do Java and C# have that golang doesn't? Incidentally, both of them have solutions to the billion dollar mistake, which golang doesn't.
- azth 5y agoWhich is arguably even worse, because it goes on undetected and the code ends up producing incorrect results silently.