2 ms·
Modules are for us. They provide context. You want to use a function name as a namespace and that creates problems for organization and conceptualization. Any c
by jack9 11y ago
Modules are for us. They provide context.
You want to use a function name as a namespace and that creates problems for organization and conceptualization. Any compiler should be able to look at foo() and module:foo() (with identical side effects) and optimize. So what if I duplicate code? There's no clear advantage to focusing on that as a problem. Let the machines do the machine optimizations and you do your code organization (which is a harder problem).
- icebraining 11y agoSo what if I duplicate code? There's no clear advantage to focusing on that as a problem. Sure there is: it makes it much more likely that fixes will only be applied to certain copies of the function. A better solution would be to convert modules in groups: a function is not "in" a module, but it can be added to one or more groups, like emails in a tag system or hardlinks in an Unix filesystem.