Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Today I was doing something on the site, and did a mistake I often find myself doing. There is a routine called isGod() which I have a habit of spelling isGods(). It occured to me it would be nice if isGods() was a synonym of isGod() so it wouldn't matter, especially as isGods() isn't that unrealistic a name for what the routine does. But on reflection it seems to me that this maybe isn't the best idea, just making code less clear to read. But then it occured to me that its not entirely uncommon to see synonyms for routines named after words that are spelled differently in American and British english, such as color/colour and words ending in 'ise' and 'ize'. So there is some precedent for this kind of thing. I wonder what the monastery thinks of this practice. I mean how far should one go with this? Especially when you consider other languages beside English, or other aspects of this issue, such as mistakes like mine.
--- $world=~s/war/peace/g In reply to Are sub/method synonyms acceptable coding practice? by demerphq
|
|