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! (($ &) $) 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 (&.($).&.(:$) 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? --
