lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 10 September 2010 01:56, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Fri, Sep 10, 2010 at 3:04 AM, Ryota Hirose <hirose.ryota@gmail.com> wrote:
>> a = if x == y then good() else bad()
>
> Why not the good old-fashioned a = x == y and good() or bad() ?

This doesn't work when it's possible for good() to return false or nil

    henk