[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Backslash-newline escape as a line continuation rather than a newline?
- From: Alexander Gladysh <agladysh@...>
- Date: Mon, 5 Apr 2010 13:38:43 +0400
>> 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.