Re:Special Cases Are a Code Smell
by klmr on Friday January 25, 2019 @06:50AM
(#18997230)
I do feel that elegant implementations are superior to others (all other things being equal). However, we need to be careful how we define “elegant”. For instance, while I fundamentally understand the drive to eliminate special cases, I don’t think that zero-padding the input (or concatenating the reversed input) is necessarily more elegant. It certainly incurs a nontrivial runtime overhead (unless done via lazy data structures, in which case we’ve just hidden the special cases).
[ Parent
| on HN ]
There are no comments on this comment yet.