3 ms·
> Instead, one could "tag" a function/class/constant as belonging to multiple modules, and one's editor could aggregate all members of a cross-cutting module as
by akkartik 7y ago
> Instead, one could "tag" a function/class/constant as belonging to multiple modules, and one's editor could aggregate all members of a cross-cutting module as needed. Organization within actual files on disk becomes an implementation detail.
Yes, this is interesting. Are you thinking of something like Ruby's modules and `include` directives? (https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.h...) Is there a reason the editor has to do this rather than the language?
- _bxg1 7y ago> Are you thinking of something like Ruby's modules and `include` directives? Unfortunately I'm not very familiar with Ruby, so I'm not sure > Is there a reason the editor has to do this rather than the language? The language would definitely have to support it (though maybe you could accomplish something similar with annotations and/or special comments in an existing language), but without special editor support you wouldn't gain much from it. Your constructs would still be scattered across files in ways that make compromises. Whereas editor support could pretend the files don't exist at all.