Re:Write code. Not too much. Mostly functions.
by harpiaharpyja on Monday December 21, 2020 @10:49PM
(#25502646)
Given the context of the posts that it was replying to, my impression was that they meant the "rule of three" applied to an entire abstraction layer.
[ Parent
| on HN ]
Re:Write code. Not too much. Mostly functions.
by eyelidlessness on Monday December 21, 2020 @11:08PM
(#25502741)
I still don’t think I’d react differently. A function is an abstraction layer. Maybe this is just me being unintentionally obtuse because I’ve worked so long in environments where functions or collections/modules of functions are the primary organizing principle, but when I encounter “premature abstraction” arguments I don’t generally understand them to mean “sure take those three repetitions of the same logic and write a function, but think really hard about writing a module/namespace/package/class/etc”. Am I misunderstanding this?