4 ms·
> I dunno; maybe it's "ugly," but it's also explicit, and easy to see. Assigning meaning solely to subtle presentational differences can make code hard to read,
by burntsushi 14y ago
> I dunno; maybe it's "ugly," but it's also explicit, and easy to see. Assigning meaning solely to subtle presentational differences can make code hard to read, and increase the likelihood of mistakes (as well as confusing beginners).
I typically disagree when people say, "Well you haven't tried Go yet, so maybe you should," but this is one of the few cases where I agree. The exported/unexported syntax is weird to look at, but once you start using it, you quickly realize it to be amazing.
One of the key things about using a capital letter to indicate export/unexport is that you know if a function or a method is exported at the call site. That is, the export information isn't just in the function declaration, but in the name itself.
And trust me, it is not hard to read. It's not that hard to imagine that your eyes are quickly trained to see the export information.
> [It's a similar problem to Python's significant whitespace.]
No, that's not a problem for anyone who knows how to not mix tabs and spaces.
> and then just released the result without actually understanding the repercussions of many of their decisions
What's ironic is that you're criticizing a feature that they kept because of how it worked in the real world.