in reply to Pondering Regex::English

First of all its name should be Regexp::English to fit with the current naming structure.

Secondly, how does it compare with Damian's Regexp::Common? I think the best way to do your module would either be as part of that, or as a wrapper around it. If the wrapper approach fits what you want, then I think an excellent "proof of concept" would be a partial translation into another language, for instance a (limited) Regexp::Francais.

Replies are listed 'Best First'.
(Ovid - a blight on the language) Re(2): Pondering Regex::English
by Ovid (Cardinal) on Aug 24, 2001 at 03:58 UTC
    <rant>

    While I can't disagree that maintaining a standard naming structure a Good Thing, I have to say that I agree with Jeffrey Friedl regarding "regexp": it's a blight on the language. I speak English and a bit of French and I can't imagine any speakers in either language finding "regexp" to roll off the tongue easier than "regex". In fact, I find it hard to imagine that speakers in any language would enjoy that P on the end. "regexp" sounds like something Sylvester the Cat would spit out in conversation if he were conversant with Perl.

    I don't know who started the "regexp" naming scheme on the CPAN, but I was at a talk that Damian gave recently and unless I drastically misunderstood him, he also thought that "regexP" was an abomination.

    Which is my roundabout way of saying that I get chills up my spine every time I hear someone trying to say 'regexp'.

    'Nuff said :)

    </rant>

    This node was not brought to you by the letter 'P'.

    Cheers,
    Ovid

    Vote for paco!

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      I've heard that it is "regexp" with a silent "p". But I still use "regex".

      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      I speak English and a bit of French and I can't imagine any speakers in either language finding "regexp" to roll off the tongue easier than "regex".

      For the unconvinced, try speaking the following aloud at a normal pace:

      Regexp regexp regexp

      Toy boat toy boat toy boat

      Regexp regexp regexp

      Pass the peanut butter.

      I speak French with a bit of English (and i try to learn a little german by listening www.jazzradio.net). I think that regexp is a better mnemonic then regex. It is indeed a tongue twister so the P may be better silent.

      -- stefp

Re: Re (tilly) 1: Pondering Regex::English
by chromatic (Archbishop) on Aug 24, 2001 at 05:04 UTC
    You're right about the namespace thing. "Regexp" is abominable, but it's the current namespace.

    Regexp::English has very little in common with Regexp::Common, however. One is a library of common regexes. The other is a wrapper around qr with a few handy features.

    I like the idea about providing other languages, though. It would be useful to abstract out the common features and use glob aliasing to build the appropriate sub and method names for various other languages. Supporting locales could be tricky, though.

    Supposing this did become the parent to all sort of language-specific long regex modules, what would it be called? Regexp::Easy? Regexp::Language? Regexp::Long? Regexp::Language::Base?

      I agree with disliking the name. (Besides which, Perl's regular expressions aren't even that regular.)

      But I still think that you should think carefully whether you are best done as a wrapper around Regexp::Common. The point is not that you are doing something similar, but rather that users of your module will likely want to do the same tasks that Regexp::Common makes easy, and it would be nice for your module to be able to give you all of its snippets.

      This is particularly true considering how long it will be with your module to describe the common REs that Damian supports...

      As for the language hierarchy, I hate thinking up names. You could, though, just call it Regexp::English, and have all of the other ones depend on Regexp::English. A bit of a hack, but your internals are your business, users should not have hidden expectations...