Hacker News new | ask | show | jobs
by ac29 2420 days ago
Right, and that's the point, aside from the fact those 2 are actually different in nim. I see what you are doing there, but that would have been very confusing when I started programming.

Question is, should the language enforce you giving your variables a better name, or should convention? I think there are reasonable arguments for both.

1 comments

But does a language with Python-like syntax really have to try to be so "beginner-friendly" that it enables inconsistent casing?

The language itself can't enforce better variable names, at least not this way - Nim doesn't stop me from using "abcd" or "a0, a1, ... a100" as variable names even though it's usually a very bad idea.

No, I think a language should help keeping the code consistent in the long term - and having this strange case insensitivity doesn't help there in my opinion.

> I think a language should help keeping the code consistent in the long term - and having this strange case insensitivity doesn't help there in my opinion.

Not at all. Style insensitivity encourages good variable naming and there are both formatters and also the simple text completion in editors to guarantee consistency.