Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

"regular expressions" need a new name

by bjelli (Pilgrim)
on Jul 15, 2002 at 10:04 UTC ( [id://181732]=perlmeditation: print w/replies, xml ) Need Help??

Has Apocalypse 5 left you with futureshock? Did Synopsis 5 leave you with the feeling that you are now just as confused as before, only more intensely so? Then it's time to have a break and let your brain cool for a few minutes. Let's turn to a less ambitious project:

Perl's so called "regular expressions" have long since left the original meaning of that term behind. It's really ridicilous that one of the most powerfull aspects of perl should be named after the most restricted, simple grammars you can imagine. It's high time we give this thing a new name. I propose keeping the short form "regexp" and just giving that a new interpretation.

rather elegant grammatical expressions
really elaborate grammatical expressions
ridiculously eclectic grammatical expressions
....

ideas, comments, .... ?

p.s. be the first to ++ this article and make me a friar!

--
Brigitte    'I never met a chocolate I didnt like'    Jellinek
http://www.horus.com/~bjelli/         http://perlwelt.horus.at

Replies are listed 'Best First'.
Re: "regular expressions" need a new name
by Abigail-II (Bishop) on Jul 15, 2002 at 12:22 UTC
    To quote the first paragraph of Apocalypse 5:
    This is the Apocalypse on Pattern Matching, generally having to do with what we call "regular expressions", which are only marginally related to real regular expressions. Nevertheless, the term has grown with the capabilities of our pattern matching engines, so I'm not going to try to fight linguistic necessity here. I will, however, generally call them "regexes" (or "regexen", when I'm in an Anglo-Saxon mood).
    Two things can be learned from here. First, there's no reason to abandon the term "regular expression", or "regex" for short. It's a term people know and have been using for a long, long time. Second, there is a alternative term already, "Pattern Matching". A term used in the Camel-III, and predating the first efforts on perl6.

    Abigail

Re: "regular expressions" need a new name
by moxliukas (Curate) on Jul 15, 2002 at 10:36 UTC

    This is very true. "Regular expressions" should be named something else. I am Lithuanian, so my native language is Lithuanian. The English phrase "regular expression" sounds OK with me, because I have accustomed to this meaning, but whenever someone tries to translate this term into Lithuanian things start to go plain weird.

    The problem is that there is no direct translation, and everyone tries to translate it word by word. And so you get weird phrases like "paprastosios išraiškos" which roughly means "simple expressions" (and everyone knows they are very far from being simple!) or "reguliarioji išraiška", which I immediately associate with an expression that repeats regularly in time.

    So this powerful tool must get a proper name, even if it was an abbreviation that would not be translated into any languages (that might even be the only sane solution)

      regula (lat.) :-)

      So its more an semantic short and highly abtsract expression of rules based upon strict logic, a "ruleset" that describes best what you're looking for :-)

      Have a nice day
      All decision is left to your taste

Re: "regular expressions" need a new name
by japhy (Canon) on Jul 15, 2002 at 15:29 UTC
    Perl's regexes have rarely been "reg". I heard someone (chip?) call them irregexes. I have no problem calling them regexes, though. With the number of languages working with PCREs (Perl-compatible regular expressions), our regexes might become the standard someday.

    But Perl 6's regexes make me think more of grammars than patterns.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      Ahh... but the entire point of Apoc 5 is to make them more regular -- in the "not irregular" sense, anyway. I vote "EREML" (pronounced like dremel) for the new programming language. (If you think in terms of expressions, you're missing the (OK, a) point of a5.


      Confession: It does an Immortal Body good.

Re: "regular expressions" need a new name
by little (Curate) on Jul 15, 2002 at 11:57 UTC

    <tongue_in_cheek>To cite japhy's cool 'invention', I'd vote for sexeger. Who said that sentence about coding would be like sex? If you do it worng it serves no fun. But sexeger is fun, well first was Perl to me, I later discovered regular expressions. So Perl was my first love, and we have the best sex ever together.</tongue_in_cheek>
    Well, Abbreviations are always fun :-)

    Have a nice day
    All decision is left to your taste

      The whole point of sexeger is that it's regexes backwards. I wouldn't want people to keep claiming Perl 6 regexes are backwards from Perl 5. Ewww. Bad meme.

      -- Randal L. Schwartz, Perl hacker

Re: "regular expressions" need a new name
by dreadpiratepeter (Priest) on Jul 15, 2002 at 12:53 UTC
    There was a suggestion made, and I can't remember who to attribute this to, that they be called grammexes.
    I kind of like it. Although I also like the regula suggestion below.

    -pete
    "Pain heals. Chicks dig scars. Glory lasts forever."
Re: "regular expressions" need a new name
by crazyinsomniac (Prior) on Jul 15, 2002 at 10:21 UTC
Re: "regular expressions" need a new name
by stefp (Vicar) on Jul 16, 2002 at 04:50 UTC
    What meanings do we want to convey? Regexp are now more like functions, their field of use has enlarged to the parsing of whole language defined by grammars. And parsing grammar is the selling point. What can do more can certainly do less. I would call them grammexen to get the point thru: "you can parse using grammexen, you can't using plain old regexen". It makes clear that perl6 is not only for assembling or lexing strings but that it can handle complex languages. grammex ends like regex, so it is a reminder that it is a related concept.

    I want to spell it loud and clear. I don't want to hide the clue about grammar in an acronym because most acronyms are anacronyms.

    -- stefp -- check out TeXmacs wiki

Re: "regular expressions" need a new name
by Juerd (Abbot) on Jul 15, 2002 at 12:45 UTC

    Has Apocalypse 5 left you with futureshock? Did Synopsis 5 leave you with the feeling that you are now just as confused as before, only more intensely so?

    It was no shock, but a very pleasant surprise.

    Perl's so called "regular expressions" have long since left the original meaning of that term behind. It's really ridicilous that one of the most powerfull aspects of perl should be named after the most restricted, simple grammars you can imagine.

    Who cares about the name? Well, apparently you do, but my point is that it's just a name. The power that the technique gives is important, the name is just an identifier.

    It's high time we give this thing a new name.

    No, it's not.

    I propose keeping the short form "regexp"

    Funny - Larry proposed to get rid of "regexp" and use "regex" instead.

    p.s. be the first to ++ this article and make me a friar!

    I always answer upvote requests with a downvote.

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

      I mostly agree with your points, though I wouldn't quite take so harsh a stance.

      The upvote request irked me too; although it simply cancelled out the ++ for me, so I voted nothing.

      I do think the point is a good one to raise, because names can be important - even though I do not think we should change the name "regex". It is just too ingrained for a successful attempt to change it and the meaning too long ago lost on the "general public" for a change to have any meaning.

      Personally I like the change in Camel 3rd Ed to "pattern matching". That is both an old term as well as an accurate one. I'll try to stick to that.

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://181732]
Approved by cjf
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-24 19:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found