4 ms·
I didn't said that we should remove default values, that is a wrong interpretation of my message. For example we could have a new non-nilable pointer type (tha
by Seb-C 3y ago
I didn't said that we should remove default values, that is a wrong interpretation of my message.
For example we could have a new non-nilable pointer type (that would not have any default value), or an optional monad natively in the language (or any other thing in-between, there are many possibilities). That would allow the compiler to statically report about missing checks, without breaking backward compatibility.
But we all know that it's not going to happen soon because while not breaking any existing code, it goes against the "everything has a zero-value" dogma. That was the meaning of my message.
- xyzzy_plugh 3y agoYou are wrong regardless: there is no such dogma. There are numerous ongoing proposals discussing how to accomplish this. You're welcome to contribute. It took me a minute to find these proposals, as examples: https://github.com/golang/go/issues/57644 https://github.com/golang/go/issues/57644 https://github.com/golang/go/issues/19412 https://github.com/golang/go/issues/19412 I interpret your comments as propagating FUD in bad faith.
- Seb-C 3y agoSum types are a different issue (even if somewhat related) than what I am talking about. Even if sum types were introduced, it would not help with nil values because - as you said - backward compatibility won't be broken. If I had the luxury of spare time to contribute, I would probably spend it switching away to another richer language instead, because it would be cheaper, solve more of my problems and with a higher degree of certainty. And that's not even mentioning the attitude and toxicity of the community compared to most of other languages facing critics and ideas.
- xyzzy_plugh 3y agoWhat toxicity? This doesn't track for me. > backward compatibility won't be broken. I'm not sure what your point is anymore. You are clearly divested. Your assessment is totally unfounded. What are you trying to accomplish here?
- Seb-C 3y agoPersonal attacks are not welcome and against HN guidelines. You can disagree with me and criticize my points, but I do not feel like it's done in a good faith or is leading to anything constructive. So I'm going to stop the discussion here and let the readers judge by themselves what I meant, and what to conclude about it.
- xyzzy_plugh 3y agoI mean no ill intent, I genuinely have no idea what you're arguing towards. You repeatedly claim dogma and even toxicity (!) where I can find no evidence of either -- that certainly doesn't feel like good faith to me. It feels like FUD.