News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by suzzer99 on Saturday November 05, 2022 @08:05PM (#33487284)
Yeah if it's really shared code. But if you're just trying to factor out small redundancies that are only implemented a few times and could diverge in the future - then no.

I'm a big fan of WET - write everything twice. Then maybe the 3rd of 4th time worry about creating some new abstraction to share code. It's so much easier to add an abstraction later when it becomes obviously needed - than to remove one when you find out your three things actually need different variations on the lib code.

There are no comments on this comment yet.