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


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.

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.