lua-users home
lua-l archive

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


>> Just to show one use case, I use a module system where you start each
>> module with:

>> require 'dokidoki.module'
>> [[  list, of, definitions, to, export  ]]

> Sure, with every syntax change, some existing code needs to be fixed. But in
> the case of this (proposed) change:
> a) there is not so much code to fix (cases like the above are rare), and
> b) the fix is local and trivial

I have a *lot* of code relying on this behaviour.

I use it for string building.

local buf = { }
local function cat(v)
  buf[#buf + 1] = v
  return cat
end

cat "foo " (bar) " baz"

For complex cases like code generation string of calls can be quite
long. Also, adding extra braces would impact readability.

Alexander.