Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Built-in Function Homonyms for Method Names Bad, Too?

by macrobat (Beadle)
on Jan 26, 2006 at 18:54 UTC ( [id://525816]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Built-in Function Homonyms for Method Names Bad, Too?
in thread Built-in Function Homonyms for Method Names Bad, Too?

Remember, though, that polymorphism is one of the selling buzzwords of object-oriented programming: you can use the same method name on objects of a different class, and have it do different things. That's desired. (And yes, I know that "objects of a different class" and "builtins" don't equate, but in this case they overlap enough for the benefit to still hold.)

Also, although this means you need to be a little more cautious in your module, remember that the whole point of creating a module is so that it will get re-used. A little burden up-front is (presumably) worth it in the long run. If a dupe of a built-in name makes the most sense to you, it will probably be easy to remember (and therefore easy to use) for your clients as well.

  • Comment on Re^3: Built-in Function Homonyms for Method Names Bad, Too?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-18 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found