4 ms·
Srsly. I've started just copying all my shit into the relevant package instead of all the subclassing. Because you know I'm gonna want to change that shit in th
by swayvil 9y ago
Srsly. I've started just copying all my shit into the relevant package instead of all the subclassing. Because you know I'm gonna want to change that shit in the future. And whether I change the class or the subclass shit is gonna break. And then I gotta fix that shit. So I'm a caveman now.
- aphextron 9y agoThere’s a legitimate argument for choosing reasonable code duplication over inheritance. It comes up a lot in iOS development when you just need a new UIView with a few tweaked string values. DRY should not be an unassailable mantra. Keeping a flat class heirarchy keeps programmers sane.
- hooph00p 9y ago>DRY should not be an unassailable mantra. Excellent takeaway.
- binarycrusader 9y agoOr as the Rob Pike puts it, "A little copying is better than a little dependency." https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s https://www.youtube.com/watch?v=PAAkCSZUG1c&t=9m28s