A Short Ballad Dedicated to the Growth of Programs
Written by Eric Normand. Published: December 11, 2011.
Eric Normand's Newsletter
Software design, functional programming, and software engineering practices
Over 5,000 subscribers
Reference: A Short Ballad Dedicated to the Growth of Programs
This is a cautionary tale set in a dystopian Lisp where nil is not
false and false is not nil.
So I went back to the master and appealed once again
I said, pardon me, but now I'm really insane
He said, no you're not really going out of your head
Instead of justVAL, you must useNOT NULLinstead
nil means (traditionally) false, the empty list, and also "no value".
In my opinion, Lisp has hit a sweet spot. Somehow, nil overloading
makes for succinct programs.
It's possible to go overboard and do this wrong. Case in point: the problems with boolean values and comparison in Javascript.