Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Re: Re: Re: Exegesis 6 - Named binding

by broquaint (Abbot)
on Jul 31, 2003 at 14:29 UTC ( #279589=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Re: Exegesis 6 - Named binding
in thread Exegesis 6 - Named binding

So *%data = *%values should be compiled as ...
But this would implicitly cast the plain assignment to a binding, which is kind of icky, hence the reason I suspect that %data will be clobbered.
So the question here is, is $fish eq "hest" after this, or undef?
I think in the first example $fish will become undef as part doesn't return enough args. Not only that, because of the lack of binding, the LHS will be assigned whatever part returns in the order it is returned. As for the second example, you still have the problem of lack of binding, and you're assigning a pair to nothing, and if the value of a pair is assigned to when a pair is used on the LHS of a simple assign then you might get a compile-time error as you'd be assigning to the constant string "hest".

Update (WRT to Cine's update): given your definition of := then nothing would happen to $fish as it would have nothing to bind to, and I'm hoping that would be how it is implemented, as binding a variable to nothing doesn't make much sense.


  • Comment on Re: Re: Re: Re: Re: Exegesis 6 - Named binding

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://279589]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2022-12-05 14:27 GMT
Find Nodes?
    Voting Booth?

    No recent polls found