Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Devel::EvalError lives

by Your Mother (Archbishop)
on Jul 07, 2008 at 04:45 UTC ( [id://695913] : note . print w/replies, xml ) Need Help??


in reply to Devel::EvalError lives

This is wonderful. Your snippets here about the issue a while back opened my eyes to a bunch of things I didn't know/consider. But I have to ask about the module, what's with the camelcase methods? ItIsReallyNotPerlLike and IveGrownIncreasinglyIrritatedByItsUse.

Replies are listed 'Best First'.
Re^2: Devel::Eval_Error lives
by tye (Sage) on Jul 07, 2008 at 14:34 UTC

    Underscores suck. They disappear in browser links. They render wider than spaces in propotional fonts conveying the exact opposite meaning of what they should (these_items_are_groups_together even_though_the underscores_have_spread_them_apart). They are relatively hard to type.

    But so much for whining about trivialities.

    Perl uses all-lower-case or all-upper-case for its special names (keywords, reserved words, built-ins, etc). So I don't use either scheme for naming subroutines (since the practice of marking user subroutines with their own sigil fell out of fashion). So I consider it important (not just "style") to use an initial capital on subroutine names.

    I've never seen anybody using underscore_ridden_identifiers with mixed case. And I'm inclined to consider Such_A_Practice a Worst_Of_Both_Worlds situation (for one thing, even harder to type, especially when the 'shift' has to quickly switch sides). And other alternatives seem equally silly (different capitalization for one-word names or Just_initial_cap_with_underscores).

    So I use CamelCase for module names and for subroutine names. Since there was a grand total of two subroutines with TwoWords names (and one more whose use is already discouraged that would have two words, one hyphenated hence three capitals in CamelCase) complaining "IveGrownIncreasinglyIrritatedByItsUse" is over the top, of course.

    I suppose you prefer CGI.pm where one uses td() but Tr()? I don't want to be the first module author who picked 'say', 'our', 'qv', 'when', 'given', 'dor', etc. as a subroutine name.

    I suggest you get over it. Otherwise, wikis are going to be painful for you. :)

    - tye