Carl Mäsak
Carl Mäsak
Fwiw, Python talks about ["simple statements"](https://docs.python.org/2/reference/simple_stmts.html) in its documentation. So... it seems to be a thing, at least for grammar explanation purposes.
``` my x if false; ``` Inspired by Perl 5's `my $x if 0;` which did weird things - what exactly? Anyway, in 007 I'd expect this to keep the...
> It'll need to be implemented using _something_ like a "what are all the allowable infixes" hook, which adds all the assignment infixes in a dynamic-enough way that (say) defining...
If we go ahead and make assignment a statement form, I guess this one becomes a statement form too.
Even here, lvalues get involved in a big way. Any side effect happening in the path of the lhs should happen _once_, which relates both to the Single Evaluation Rule...
> Also, remember that the parsing of `op=` is such that the entire rest of the expression has invisible parentheses. I think this is _wrong_, but without observable consequences, so...
Heh. The new implementation is [left-recursive](https://en.wikipedia.org/wiki/Left_recursion). Not a showstopper in itself, of course, but... interesting. * Easiest would be if the parser is able to take left-recursive things in stride....
> * There's also the question of how we allow `+=` but disallow `+==`. It's possible `is parsed(/ "=" /)` would be enough here. (Assuming the above-mentioned left recursion is...
That brings up another point. The "chaining operators" in Perl 6 (corresponding to all the comparison ops in 007) are "too diffy" to be assignmentopified. Perl 6 has a precedence...
> The new implementation is [left-recursive](https://en.wikipedia.org/wiki/Left_recursion). Not a showstopper in itself, of course, but... interesting. Just noting in passing that this could be handled by adopting the `infix:postfix:` idea from...