3 ms·
> (Any Lisp dialect requiring code such the former is labelled differently, namely "idiotic".) Yeah, but for idiots like me who sometimes make mistakes, having
by copsarebastards 11y ago
> (Any Lisp dialect requiring code such the former is labelled differently, namely "idiotic".)
Yeah, but for idiots like me who sometimes make mistakes, having a type system that catches errors for me helps sometimes. There are plenty of times in languages that treat null as false-y where I've put completely the wrong variable in and gotten no useful feedback from my interpreter because it type-checks just fine and the error doesn't become apparent until 50 lines of code later in a completely different function.
Besides, if you're frequently writing code like this, it's probably because you don't understand what you're doing and are working at the wrong level of abstraction for your problem. If you're recursing over items in a list, it's almost certain you should be using a higher-order function.