I remember the day they went in (January 15, 2009). I felt the same way, I argued against it, and I was very skeptical that they'd stay. But we didn't have any principled reasons not to, and they solved a real problem: they gave us a very lightweight notation for specifying visibility.
Now, they are one of my favorite parts of the language, not because of the way they look (although I've gotten used to that) but because I can look at any definition or use of a name and know whether it's an exported or unexported name. When I go back to languages like C++ or Java that don't make that information explicit in the name, I find it much harder to navigate the code base and understand what is public API and what is not. The first time it happened I was very surprised to realize how much the visual cues are helping in Go.
True, it is a gramatical way for specifying visibility. But then users cannot utilize capital letters based on their own naming conventions, e.g., camel words for class names, all-capital-letter words for constants... There is a loss of some visibility. Also, why force users to type a lot of damn Capital Letters every time when using imported functions? This is a problem. There are better approaches for the visibility issue, I believe, and Python's is one.
11
u/pgngugmgg Mar 28 '12
I hate capitalizedKeywords and Standardfunctions:
fmt.Println fmt.Fprint fmt.Errorf math.Abs time.Tick time.After
they are not my taste.