On Wed, Oct 19, 2005 at 03:02:14PM +0200, TSa wrote:
: HaloO,
: 
: Juerd wrote:
: >Luke Palmer skribis 2005-10-18 11:57 (-0600):
: >
: >>It looks nicer if you use the indirect object form:
: >>   trans "string": [
: >>       <h e> => "0",
: >>   ];
: >
: >
: >It'd also look very nice with optional parens:
: >
: >    "string".trans [ <h e> => "0" ];
: >
: >Or is it not yet time to resuggest that? :)
: 
: I like it. Given enough Meta Information---namely the structural
: arrow type---the .trans could be parsed as postfix op that returns
: a prefix op. Otherwise you get a 'two terms in a row' *syntax* error!
: 
:    (($ &) $)

I think it'd be somewhat unfortunate if we started trying to guess which
.trans was eventually going to get called and change the parse based
on that.

: The left item is actually calculated at compile time from string
: interpolation. The $ on the right is an itemized pair. Further
: expanded we get
: 
:    ((&.($) & :$)
: 
: or perhaps
: 
:    (&.($).&.(:$)

This notation is unfamiliar to me.

: BTW, lets assume the non-invocant param of .trans were called $foo.
: Would in the above case +($foo.key) == 2? And I guess the parens
: could be dropped because .key binds tighter than prefix:<+>, right?
: I mean the type of the key in the pair is an array of compile time
: strings. Or is that not preserved?

Yes, that should be preserved, seems to me.

Larry

Reply via email to