[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: is this behavior correct?
- From: Dirk Laurie <dpl@...>
- Date: Mon, 20 Jun 2011 11:46:38 +0200
On Sun, Jun 19, 2011 at 04:28:01PM +0200, Ben Kelly wrote:
> This results in the surprising and annoying situation that with lua patterns,
> you can describe some languages that you cannot describe with regular
> expressions, but at the same time there are many regular languages that you
> cannot describe with lua patterns.
It neither suprises nor annoys me that Lua has found elegant and
readable ways of allowing you to do what in other languages requires
methods that are neither.
Lua patterns give a quick-and-easy solution to 99% of the stuff a
casual user needs, and the fact that the mistake of overworking the
backslash is avoided, means that one can read a Lua pattern instead
of laboriously having to decode it.
For those who need more power inside Lua, there is always LPEG, which
makes regular expressions look tired and obsolete.
Regular expressions are like stout: great for those who've learned to
love it, but repugnant to others. And there is always an Irish pub
around the corner called "Perl".
Dirk