lua-users home
lua-l archive

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

On Thu, Oct 20, 2011 at 12:40 AM, Tony Finch <> wrote:
>  local foo, bar, zig <- tbl
>  local foo, bar, zig =,, tbl.zig

Very nice notation!

>  tbl -< foo, bar, zig

The 'syringe operator' is great naming.

I suppose the chief obstacle to adoption is that this is fairly
specialized sugar, and not keyword-driven.

Another option for injection-syntax for modules would be something like this:

return { @foo, @bar, @zig }


return { foo=@, bar=@, zig=@ }

 (becomes return { foo = foo, bar = bar, zig = zig } which is common
also in other contexts)

However, weird sigils have usually been frowned upon, because of the
old fear-of-Perl.

steve d.