| ▲ | andai 13 hours ago | |
Given an option that is configurable, why would the default setting be the one that increases probability of errors? For some niches the answer is "because the convenience is worth it" (e.g. game jams). But I personally think the error prone option should be opt in for such cases. Or to be blunt: correctness should not be opt-in. It should be opt-out. I have considered such a flag for my future language, which I named #explode-randomly-at-runtime ;) | ||
| ▲ | miroljub 11 hours ago | parent | next [-] | |
> Or to be blunt: correctness should not be opt-in. It should be opt-out. One can perfectly fine write correct programs using mutable variables. It's not a security feature, it's a design decision. That being said, I agree with you that the author should decide if Zen-C should be either mutable or immutable by default, with special syntax for the other case. As it is now, it's confusing when reading code. | ||
| ▲ | psychoslave 9 hours ago | parent | prev | next [-] | |
But why put it as a global metaswitcher instead of having different type infered from initial assignation qualifier? Example:
Or with the more esoglyphomaniac fashion | ||
| ▲ | Y_Y 11 hours ago | parent | prev | next [-] | |
> I have considered such a flag for my future language, which I named #explode-randomly-at-runtime ;) A classic strategy! | ||
| ▲ | Dylan16807 7 hours ago | parent | prev [-] | |
> Given an option that is configurable, why would the default setting be the one that increases probability of errors? They're objecting to the "given", though. They didn't comment either way on what the default should be. Why should it be configurable? Who benefits from that? If it's to make it so people don't have to type "var mut" then replace that with something shorter! (Also neither one is more 'correct') | ||