3 ms·
How does a language favor copy/pasting? Do you mean it makes code reuse harder?
by jayd16 4y ago
How does a language favor copy/pasting? Do you mean it makes code reuse harder?
- rakoo 4y agoIt's not so much part of the language but it's an idiom that is said by one of its authors (https://youtube.com/watch?v=PAAkCSZUG1c&t=9m28s https://youtube.com/watch?v=PAAkCSZUG1c&t=9m28s). "Code reuse" always has some non-compressible context: another import with a line in go.mod, another repo and dependency, which doc is going to be on another page/site, etc... It makes sense for big dependencies but not for small ones; the threshold where "small" becomes "big" being of course subjective.
- geodel 4y ago> How does a language favor copy/pasting? It favors as a culture. A little copying is better than a new dependency Just like Java has culture to setup a single http endpoint one typically adds 50-60 little jar files of Spring Boot starter.
- kaba0 4y ago> Just like Java has culture to setup a single http endpoint one typically adds 50-60 little jar files of Spring Boot starter No, you add a single annotation..
- mrkeen 4y agoA language's type system can disallow certain constructs that you might want to reuse. Mappable, for instance.