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.
[ Parent
| on HN ]
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.
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.
That is a valid point. There is a tendency for things to go the java way.