lua-users home
lua-l archive

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

Am 18.09.2016 um 14:57 schröbte Soni L.:

Is there any good reason to not do it the Rust way? Lua has a separate
boolean type, just like Rust. You can't add/subtract/multiply/divide a
Rust boolean with a Rust integer and you can't
add/subtract/multiply/divide a Lua boolean with a Lua integer. But what
Rust does let you do is use bitwise not on a boolean, and it saves an

Integers can be used in a boolean context, and you'd want a logical not operator that works correctly for those as well.