[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE syntax (was Re: [FWP] TPJ One-Liner #39)



> Quoting Ronald J Kimball (rjk@linguist.dartmouth.edu):
> > What is wrong with the POSIX character class syntax?  It provides a clear
> > name for each class, and does not conflict with regular character classes.
> 
> As with the rest of POSIX regular expression syntax, is is \(unforgivably\)
> ugly.

and you would argue that all of those ?::<+ operators that make up the 
_current_ RE machinery *ain't* <em>unspeakably</em> ugly [and indeed, to 
my eye impossible to grasp]: was ??:! the greedy-lookbehind operator or 
the one that inverts the next quantifier if the previous one failed.

Is "\a" an alphanumeric [and so that \A, by the usual Perl convention, 
would be "any non-alphanumeric"]?  I thought the programming world had 
matured to moving beyond one-character mnemonics 30 years ago.

IMO, virtually *all* of the RE syntax could do with a real rethinking and 
as the sematics of the this's and that's get more complicated and subtle 
and it all CRIES OUT for some "use English"-style relief [and the POSIX 
char classes ain't such a bad first step].  REs are never really all that 
easy to comprehend; Perl has taken that to a ridiculous level by having a 
syntax that makes it even MORE opaque than it need be..

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com     Pearisburg, VA
    -->  Too many people, too few sheep  <--          

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe