Null, Nil-Punning and You 0 ▲ Alex Alejandre's Recent Posts 20 days ago · Tech · hide · 0 comments Hoare’s null references break typing’s promise in ALGOL (and other statically typed languages). If type T is declared to hold reference to a specific thing, but can hold a non-value (null) satisfying none of T’s operations, the type checker is not actually guaranteeing and dereferenes must be checked manually. In Lisp, nil isn’t in a static contract (e.g. that a variable is a cons cell); the value is checked on use and nil has defined behavior, although it differs on dialect. Common Lisp conflated () and nil while making (car nil), (cdr nil) and nil evaluate to nil, while Scheme distinguishes ``()and#f`. Conflating false, empty list and no value, like Common Lisp, is called nil punning. Some hate and Clojurists praise it. In Janet, nil and false are falsey yet distinct; empty? checks collections, not nil?. No comments yet. Log in to reply on the Fediverse. Comments will appear here.