[Python-ideas] New pattern-matching library (was: str.split with multiple individual split characters)

Mike Meyer mwm at mired.org
Tue Mar 1 18:05:11 CET 2011


On Tue, 1 Mar 2011 19:50:44 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:

> On Tue, Mar 1, 2011 at 9:19 AM, Mike Meyer <mwm at mired.org> wrote:
> > I disagree. Fully general string pattern matching has a few
> > fundamental operations: sequence, alternation, and repetition.
> 
> I agree that the fundamental operations are simple in principle.
> 
> However, I still believe that the elaboration of those operations into
> fully general pattern matching is a complex combinatorial operation
> that is difficult to master. regex's certainly make it harder than it
> needs to be, but anything with similar expressive power is still going
> to be tricky to completely wrap your head around.

True. But I think that the problem - if properly expressed - is like
the game of Go: a few simple rules that combine to produce a complex
system that is difficult to master. With regexp notation, what we've
got is more like 3d chess: multiple complex (just slightly different)
sets of operations that do more to obscure the underlying simple rules
than to help master the system.

     <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org



More information about the Python-ideas mailing list