Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lexicals and globals assembly question

13 views
Skip to first unread message

Brian Wheeler

unread,
Aug 5, 2002, 10:17:22 PM8/5/02
to perl6-i...@perl.org
I was just looking at store_lex, find_lex and store_global and
find_global and it seems like the operands are backwards for the store_*
versions. I thought the "rule" was that the destination is the leftmost
operand. Granted the string in question isn't really the destination,
but a global/lex of that name _is_.

So instead of
store_lex P0,'a'
find_lex P0,'a'
store_global P0,'b'
find_global P0,'b'

wouldn't it be better for it to be:

store_lex 'a',P0
find_lex P0,'a'
store_global 'b',P0
find_global P0,'b'


Thoughts?

Brian

Steve Fink

unread,
Aug 5, 2002, 10:42:31 PM8/5/02
to brian wheeler, perl6-i...@perl.org
On Mon, Aug 05, 2002 at 09:17:22PM -0500, brian wheeler wrote:
>
> So instead of
> store_lex P0,'a'
> find_lex P0,'a'
> store_global P0,'b'
> find_global P0,'b'
>
> wouldn't it be better for it to be:
>
> store_lex 'a',P0
> find_lex P0,'a'
> store_global 'b',P0
> find_global P0,'b'
>
>
> Thoughts?

You've got my vote.

(I had the same reaction to an early version of the _lex stuff, but
didn't say anything because I had way too many unread messages at that
time.)

Dan Sugalski

unread,
Aug 5, 2002, 10:55:40 PM8/5/02
to brian wheeler, perl6-i...@perl.org

I had it the original way, since the store ops didn't actually have
an explicit destination, though they probably ought to have a variant
that does. (For messing around in a particular pad/global level) It
felt nicely symmetric that way. I don't feel particularly strongly
either way, though

Anyone have strong feelings for the status quo? If not, lets change it.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 new messages