http://qs321.pair.com?node_id=525816


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?