Re:Features of a dream programming language
by BatteryMountain on Friday December 31, 2021 @03:33AM
(#29746062)
Very good point. I typically use both approaches, sometimes using an interface as a method parameter just "feels" more natural, but other times a generic + type constraint is better. I usually draw the line when the infection you mention becomes too much, aka when 3 or 4 layers are now forced to use a generic cause 1 layer needed it. So yes, very valid point. The key is to find balance so that the code is still maintainable in 6 months from now, still readable + fast, while trying to reduce duplication where it makes sense.
[ Parent
| on HN ]
There are no comments on this comment yet.