lua-users home
lua-l archive

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


On Mon, Jul 12, 2010 at 21:26, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Mon, Jul 12, 2010 at 6:57 PM, Hisham <hisham.hm@gmail.com> wrote:
>> My first impression is that this could improve readability, and
>> further reduce escaping/concatenations. OTOH it could bring confusion
>> when argument order matters, and, in general, the whole thing may be
>> overkill. Any impressions?

> I had exactly the same thought on the bus last week, liked the syntax,
> and also worried about option order.  It is a very Lua-like idiom,
> particularly cool when the option values are not constants, and a good
> alternative to shell thinking, which is to build command lines by
> expanding variables.

> sh.out.gcc {o = file, file..'.c"}

BTW, if we do chaining (see my letter to Hisham), we may do this:

  sh.gcc { o = "file.o" } "file.c" ().out

With variables we need braces:

  sh.gcc { o = file } (file .. ".c").out

Alexander.