lua-users home
lua-l archive

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


On Sun, Mar 23, 2014 at 2:06 PM, Hao Wu <wuhao.wise@gmail.com> wrote:
> On Sun, Mar 23, 2014 at 1:55 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
>> Am 23.03.2014 21:39 schröbte Thijs Schreijer:
>>
>>>
>>> Thx. I understand the logic. But still would find '!' clearer for a unary
>>> not.
>>
>>
>> C uses `!` for logical not. It might get confusing if Lua used it for
>> bitwise not ...
>
> there is no "!" in Lua, and ~= is "not equal" in Lua, I would rather
> find it would be confusing to use "!" for not
>
>>
>>> Thijs
>>>
>>
>> Philipp
>>
>>
>>
>>
>
> Hao
>

I believe they're saying that it would be confusing in 5.3 to have ~=
for binary, logical-not and ~ for unary, bitwise-not.

Lua doesn't have compound-assignment operators, so it'll be confusing
to see both ~item and item ~= whatever