Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^3: what's a proper way to code method synonyms

by merlyn (Sage)
on Sep 06, 2006 at 22:05 UTC ( #571556=note: print w/replies, xml ) Need Help??

in reply to Re^2: what's a proper way to code method synonyms
in thread what's a proper way to code method synonyms

Someone should not *have* to read the documentation to use a module that serves such basic data. Is *one* way to pitch this.
And then if I want to subclass your class, I have to subclass every possible spelling. No thanks. There's no excuse for not reading the docs to determine the right method name. Name them consistent, and I'll only have to learn once.

Not to mention that even if you find five aliases for a method name, I'll type in the sixth. All that effort for nothing.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re^3: what's a proper way to code method synonyms

Replies are listed 'Best First'.
Re^4: what's a proper way to code method synonyms
by leocharre (Priest) on Sep 08, 2006 at 16:34 UTC

    I've heard little in the gist of "hey that's great, i wish more modules had synonyms!".

    At least for me, hearing your thoughts on this puts the dirt in the grave. Thank you.

    I'm going to take out the synonyms.

    I still have to make up my mind about which to keep. For example- the method named abs_path is more intuitive, at the same time good sense would be to call it get_absolute_path. So I have to pick between the shorties and the longsies. More like the midsies.

    Which to pick it's a hard call.. Consistent. Should I make braindead named routines (rel_path vs get_relative_path) because that's what's expected (because other modules have already named things a certain way)? That is a form of consistency.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2020-11-25 02:42 GMT
Find Nodes?
    Voting Booth?

    No recent polls found