Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Now there are too many colons.


Original code contains more. (::). Personally I don't understand why there are `::` and `.` to access deeper namespace levels. It's a static language, compiler should know how to resolve attributes and `.` should be enough for all cases.


It's because then you could have name collisions between variables and modules. E.g. it's ambigious whether io.Error is in a module called io, or a field of a variable called io. Which means you can no longer use fully qualified names regardless of context.


> Which means you can no longer use fully qualified names regardless of context.

How about don't shadow module names with variables if you want to use it? It works amazingly well for a bunch of other languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: