lua-users home
lua-l archive

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

I'm rather new to Lua (here because I'm embedding it in a hardware product), but I see that integers were introduced in Lua 5.3 (or omitted from the 5.2 manual) and, apparently with them, confusion about types. If someone has a link to a thread discussing the change, I'm curious to see the justifications for the added complexity.

On Fri, Jan 7, 2022 at 12:06 PM Egor Skriptunoff <> wrote:
On Fri, Jan 7, 2022 at 11:01 AM Lorenzo Donati wrote:
"// 1" producing an integer goes
against the principle of least surprise

IMO, the least surprise here would be to treat // as a one-line comment  ;-)
After many years of programming in Pascal I failed to convince my brains that // might be an arithmetic operator.
People with a C background should feel the same :-)

Benjamin Riggs
Pronouns: He / Him
Founder & CEO
Entropic Engineering LLC
670 Transfer Rd
St Paul, MN 55114
(612) 284-1152 Ext. 8128