Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: HASH keys preserve class ?

by diotalevi (Canon)
on Oct 04, 2006 at 03:19 UTC ( #576236=note: print w/replies, xml ) Need Help??


in reply to HASH keys preserve class ?

Utterly false when it comes to hash values. Hash values are stored without change. If they notice changes it's because of bugs in the code they're observing.

Half true when its hash keys. Hash keys are always strings so if you use an object as a hash key the hash has only the stringified object as a key. You can generally expect the object to remain unchanged and continue to be an ordinary object. You can always expect the hash key to only be a string. Stringification is per perl's normal rules unless the object has stringification overloading and then it can be whatever is appropriate.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://576236]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2018-07-18 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (397 votes). Check out past polls.

    Notices?