You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just went and removed these two operators from core 007 on the master branch. Outside of the tests, the documentation, and the self-hosting, we didn't mention these operators at all. Notably, there was not a single use of them in examples/.
But they're highly user-definable, and nothing is lost by defining them this way. In fact, the kind of provide a cute contrast between when you'd use a sub and when you'd use a macro.
(Why is infix:<xx> a macro? Because we want the "thunkish" behavior of for example. my i = 0; my array = i++ xx 3; (assuming postfix:<++> for convenience) should evaluate to [0, 1, 2].)
As #214 points out, it's also quite a good example of an exception to the Single Evaluation Rule — we get the thunkish behavior precisely because we evaluate the left macro operand once per iteration.
The text was updated successfully, but these errors were encountered:
One as a sub, the other as a macro.
I just went and removed these two operators from core 007 on the master branch. Outside of the tests, the documentation, and the self-hosting, we didn't mention these operators at all. Notably, there was not a single use of them in
examples/
.But they're highly user-definable, and nothing is lost by defining them this way. In fact, the kind of provide a cute contrast between when you'd use a sub and when you'd use a macro.
(Why is
infix:<xx>
a macro? Because we want the "thunkish" behavior of for example.my i = 0; my array = i++ xx 3;
(assumingpostfix:<++>
for convenience) should evaluate to[0, 1, 2]
.)As #214 points out, it's also quite a good example of an exception to the Single Evaluation Rule — we get the thunkish behavior precisely because we evaluate the left macro operand once per iteration.
The text was updated successfully, but these errors were encountered: