Allow:
Push value [value]
...
Pop value [value}
That is, push a list of items from left to right, Pop a list of items from right to left.
This has no effect on runtime, it is just a convenience for the script so:
Push $0
Push $1
Push $2
Push $3
...
Pop $3
Pop $2
Pop $1
Pop $0
becomes:
Push $0 $1 $2 $2
...
Pop $0 $1 $2 $3
There was already a request to allow this for Call but I think some internal discussions turned it down because we could not agree on left to right vs right to left but I suppose we can revisit the issue.
I agree in your example here that Pop right to left gives a nice symmetry but I'm not sure if it makes sense from a language standpoint.
Last edit: Anders 2021-12-25
Having written ARM assembly from almost the beginning, I would say that
matching lists makes sense to me, so left to right for push and right
to left for pop feels natural... but you can get used to anything.
Debates about the 'one true way' can be fun, but they really slow things
down.
While we are on the subject of extensions, I also miss indexed access to
the stack... but this is a runtime change.
Also, Exch $var1 $var2 (aka swap) would make some algorithms a bit
easier and less verbose.... but I can see that you are a lean and mean
machine...
As ever, thanks for the response.
The System plug-in pops left to right.