Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Benifits of using hash rather than number of variables?

by TomDLux (Vicar)
on Jul 20, 2011 at 16:46 UTC ( [id://915683]=note: print w/replies, xml ) Need Help??


in reply to Benifits of using hash rather than number of variables?

Other people have talked about hash arguments to routines; I'll look at a more general aspect.

The key advantage in my mind is organizing or clustering data into categories. I am defined by my clothing sizes, degrees, vehicles, etc. My degrees are defined in terms of the courses I took, the grades I got, the assignments I completed. My studies in "History of the Modern World" doesn't care about my clothing sizes or whether I have a skateboard. Aggregating data into hashes instead of independent variables creates a context, it makes it easier to understand relationships.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

  • Comment on Re: Benifits of using hash rather than number of variables?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found