logoalt Hacker News

thinklooptoday at 5:56 PM1 replyview on HN

The key lesson is that duplicate code is not necessarily "code duplication" - it was always really about abstraction duplication. If two unrelated variables happen to momentarily share a value, it doesn't mean that value should be made common between them, they are fundamentally different things. It would be a confusing lie and error-prone if the code implied they were the same and that efforts should be made for them to be in sync.


Replies

dofmtoday at 6:02 PM

I guess any blog post can remain true if you can optionally take one of the key terms and redefine it so it can also mean the opposite?