News for hackers. Stuff that matters.
Re:Why do we need modules at all? (2011) by cjfd on Tuesday August 27, 2019 @08:27AM (#20808831)
Well, with 1000 names you still don't get (many) name collisions so no modules/namespaces is fine. At some point you will find yourself introducing smurf namespacing and then I would consider modules/namespaces the better solution.
Re:Why do we need modules at all? (2011) by enriquto on Tuesday August 27, 2019 @08:33AM (#20808870)
If you think about it, smurf namespacing is much simpler thus more elegant than a "real" namespace system.
Re:Why do we need modules at all? (2011) by cjfd on Tuesday August 27, 2019 @08:50AM (#20808984)
In one sense, yes, but in another no. The main problem is that one can get real long names.
Re:Why do we need modules at all? (2011) by enriquto on Tuesday August 27, 2019 @09:04AM (#20809097)
Depending on your philosophy, that may be a feature to you. I tend to like this effect, because it forces the programmer to avoid building deeply nested structures, which is too easy to do when you abuse modules/namespaces.
Re:Why do we need modules at all? (2011) by cjfd on Tuesday August 27, 2019 @09:30AM (#20809348)
That is a valid point. There is a tendency for things to go the java way.
Re:Why do we need modules at all? (2011) by goatlover on Tuesday August 27, 2019 @11:10AM (#20810390)
Because long names in Java meant avoiding deep nesting?