4 ms·
FWIW this is the same in ruby (nil and false are the only non-true values) but I believe this comes from some older language, does anyone knows which one?
by riffraff 16y ago
FWIW this is the same in ruby (nil and false are the only non-true values) but I believe this comes from some older language, does anyone knows which one?
- route66 16y agoLisp: nil and the empty list '() are equivalent and are falsey. C: 0 is falsey, the rest not.
- riffraff 16y agowhat i meant is that there are two falsey values, in lisp (I assume CL) I believe there is no different "false" value which is not equal to nil/empty list, I think?
- route66 16y agoYes, nil and '() are the same. Alas I'm of no more help for your quest. Also SQL with false and NULL does not it the picture as NULL means unknown and is treated as such , not as false ...
- weavejester 16y agoPossibly Scheme, where #f and '() are the only non-true values, and these are equivalent to false and nil in Ruby. I'm not sure if there are any earlier examples of this.
- kanak 16y agoActually in Scheme, #f is the only false value. (e.g. the documentation for "if" in racket [1] says: "If it produces any value other than #f, then then-expr is evaluated, and its results are the result for the if form. Otherwise, else-expr is evaluated, and its results are the result for the if form. The then-expr and else-expr are in tail position with respect to the if form.") [1] http://docs.racket-lang.org/reference/if.html?q=if&q=false#(form._((quote._~23~25kernel)._if) http://docs.racket-lang.org/reference/if.html?q=if&q=fal...)
- weavejester 16y agoAck, you're right. I totally misread this.