Hacker News new | ask | show | jobs
by madpata 1813 days ago
> I just can't conceive of how modularity, in general, causes duplicate code rather than reduces it.

Yeah, like my node_modules folder doesn't contain tons of duplicate code.

/s

1 comments

Modularity doesn't cause that. Modularity doesn't inherently reduce duplication either. But modular code offers opportunities for reuse (or clearer opportunities for reuse) that non-modular code does not (or where the reuse potential is so obfuscated that it may as well be non-existent).