lua-users home
lua-l archive

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


Roberto:
> Maybe I missed the answer, but repeating Dibyendu's question: How
to reconcile a syntax that prefixes an entire local statement with
per-variable annotations?

whats wrong with `local <const> a, b, <const> c, d`? do u mean that
`local <const> a, b, c, d` means by default that a-d are all
constants, so actually an opt-out would be needed for those that
shouldnt be constants?

if i understood u correctly, then i think the interpretation of my 2nd
expression above just shouldnt make b-d constants; or i could think
about (with the `@` notation) this for making all vars constants:
`local @@const a, b, c, d` - so doubling the at symbol would extend
the range of the const from the 1st variable to all of them. this way
both needs are covered, and its really a visible thing to prevent
messing around stuffs like `a.b()` vs `a:b()` that took away some
happy time from all of us here not even once. :D (no offense for `:`,
basically im fine with it. :) )