[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: syntactic sugar for imports and exports
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 21 Oct 2011 08:34:00 +0200
On Thu, Oct 20, 2011 at 12:40 AM, Tony Finch <dot@dotat.at> wrote:
> local foo, bar, zig <- tbl
> local foo, bar, zig = tbl.foo, tbl.bar, 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 }
or
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.
- References:
- modules, require, magic, Eduardo Ochs
- Re: modules, require, magic, Javier Guerra Giraldez
- Re: modules, require, magic, Petite Abeille
- Re: modules, require, magic, Sam Roberts
- Re: modules, require, magic, David Manura
- Re: modules, require, magic, Hisham
- Re: modules, require, magic, Tony Finch
- Re: modules, require, magic, Hisham
- Re: modules, require, magic, Tony Finch
- syntactic sugar for imports and exports, Tony Finch