lua-users home
lua-l archive

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


I don't really like the 1'000'000 syntax,
because I would personally rather be able to add syntax to call a function like so:

print(sin 45)
-- (x) => expr
-- is the same as:
-- function(x) expr end
local add = (x) => (y) => x + y
local con = (x) => (y) => x .. y
local con3 = (x) => (y) => (z) => x .. y .. z
print(add 21 21)
print(con 'Hello, ' 7)
print(con3 1 '000' 000) -- con3(1000000) or con3(1)('000')(000)?

but 1_000_000 or 1..000..000 might work, or a whitespace could be made mandatory?