HaloO, Larry Wall wrote:
I deem that to be an unlikely failure mode, however. So maybe .++ is just gone now, and you have to write \++ instead. Any objections?
Please keep .++ as outlined below. Does the degenerate unspace not collide with &prefix:<\>? That is does foo\bar() not mean to capture the result from bar() and call foo with it unflattened?
I'm not sure that's a great loss. It does suggest an alternate approach, though, which is to keep the .() forms with forced method precedence, and only require \x form for alpha postfixes that want to keep their own precedence. Not sure if I like that entirely, but it could fall out naturally from the definition of unspace in the current scheme of things, so maybe it's a non-issue.
As it stands the .() forms are a great way to stack ops after a term. Together with knowing about the ops on the symbolic unary level you can easily read expressions from the terms outwards. Good practice would then be to join these extended terms by an obvious set of infix ops---usually one. The only twists to learn in this scheme would be ++, -- and **. Another good use of the dot forms is to get a single character form to tighten precedence: $x**3! != $x**3.! == $x**(3!). This is kind of reverse visually, though. So one might be tempted to make ! tighter than ** and get the looser meaning with $x**2\! which wouldn't be a degenerate unspace but a special form to unbind a tight op as in $x**$y\++ == ($x**$y)++ disregarding the fact that $x**$y is no lvalue. BTW, are there still the * and ** prefix ops for list flattening? Or are these superseded by prefix |?
and maybe even &circumfix:<| |> ::= &prefix:<abs>; |$x| except for the fact that that would collide with prefix:<|>...
So no whitespace dwimmery here? I.e. one would need |$x | to force the second | into infix? But eventually the parser has to give up when the same symbol is overloaded as prefix, postfix, infix and symmetric circumfix anyway. Regards, TSa. -- The Angel of Geometry and the Devil of Algebra fight for the soul of any mathematical being. -- Attributed to Hermann Weyl