Why is it a mess?
Posted Dec 19, 2011 7:06 UTC (Mon) by
khim (subscriber, #9252)
In reply to:
Cracks in the Foundation (PHP Advent) by HelloWorld
Parent article:
Cracks in the Foundation (PHP Advent)
Actually this is time-honored way of doing things (think SQL and nullable types in C#).
Of course in a language where the most natural operator will happily declare 0 identical to false it's a disaster, but in LISP-derived languages (where eq?, eqv?, and equal? - all agree that 0 and #f are different and if treats both 0 and 1 and kind-of-true) it works just fine.
In languages like perl, php and python (which try to "guess" what you meant and "help" you) it's disaster, obviously.
(
Log in to post comments)