3 ms·
> Not my experience - most functional languages make it much harder than it should be to say "this is exactly an X except that it prints differently" That's be
by catnaroek 11y ago
> Not my experience - most functional languages make it much harder than it should be to say "this is exactly an X except that it prints differently"
That's because this is the wrong thing to say in the first place - it dilutes the very meaning of “type”. You should factor out the common parts, and only then say X prints this way, Y prints that other way.
- lmm 11y agoThe overhead of adding another type is nontrivial (which maybe is a problem in itself; nevertheless, here we are). For business-critical distinctions it's worthwhile. For differences that only matter in one or two places, or for less-critical functionality (e.g. GUI tweaks) it may not be.