lua-users home
lua-l archive

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


On Thu, Jan 7, 2016 at 1:19 PM, Ką Mykolas <kamicc@gmail.com> wrote:
> On 1/7/16, Coda Highland <chighland@gmail.com> wrote:
>> Basically, you should always use a conditional operator (!= 0 perhaps)
>> when using the result of bitwise ops in a conditional.
>
> In case of Lua:
> ~= 0
>
> ;)
>

Side question for Roberto and Luiz: why was ~= chosen for "not equals"
instead of the more standard != in most languages? Having to remember
to use ~= instead of != is a bit annoying when I'm switching back and
forth between multiple languages for different projects.