[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Nil and false in Lua design
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 14 Oct 2013 08:43:01 +0200
On Mon, Oct 14, 2013 at 8:37 AM, Thomas Jericke <tjericke@indel.ch> wrote:
> If you ever happen to reconsider this, I am a big supporter for a change.
> For me it is a real joy to read code in a language that only accepts boolean
> values for logical expressions including if and while conditions.
Except that there are hundreds of thousands of lines out there that do
'if val' assuming that nil evaluates to false. There's really only two
cases - it's not like C./Python where you have to consider zero as
well. And languages which think that '' is false rightly deserve our
scorn.
(However, I could definitely live with no default number -> string
conversions e.g. in concatenation. That would be cleaner)