|
A bit off topic, but Icon is such a language. http://www.cs.arizona.edu/icon/
In Icon, control structures operate based on the success or failure of _expression_ evaluation. A boolean is just a value, null is just a value given to uninitialised variables. There is no "truthiness" at all. Very elegant, but takes some shift in thinking.
Robby
On Fri, Oct 11, 2013 at 11:38 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
> Hi, list!
>
> As we all know and learned to love, in Lua nil and false are false,
> and everything else is not.
>
> I vaguely remember reading years ago that this is so for historical
> reasons (Lua prior to 5.0 didn't have false), and if the language was
> designed from scratch as it is now, it would be different in this
> matter. (I think that this was said by someone from the Lua Team.)
>
> But I can't google up where did I read it...
>
> Does anyone else remember such reference?
>
> Thanks,
> Alexander.
>
I don't remember such a reference, but I can't imagine a system in
which nil ISN'T falsy...
/s/ Adam