[OT] Prolog and Regular Expressions, Was: Re: perspective on ruby
Kenneth McDonald
kenneth.m.mcdonald at sbcglobal.net
Wed Jun 28 16:52:27 EDT 2006
Lawrence D'Oliveiro wrote:
> In article <w1_1g.73947$dW3.51498 at newssvr21.news.prodigy.com>,
> Edward Elliott <nobody at 127.0.0.1> wrote:
>
>
>> XML? Conceptually (and more elegantly) covered
>> as LISP s-expressions.
>>
>
> "...Lisp is still #1 for key algorithmic techniques such as recursion
> and condescension."
> -- Verity Stob
> <http://www.regdeveloper.co.uk/2006/01/11/exception_handling/>
>
>
>> XSLT? Just a bastardized spawn of Prolog.
>>
>
> As is any kind of pattern matching, including everyone's favourite
> regular expressions. Prolog did it all.
>
I'm assuming you're kidding--there is a lot of difference between an RE
that produces a highly optimized finite state machine to quickly match a
string, and a language that uses brute-force depth-first recursion, plus
some nonobvious tricks, to do the same thing. Like many orders of
magnitude in execution time :-)
That said, it'd be nice if there were some easy way to access a Prolog
engine from Python. When Prolog is appropriate, it's _really_ appropriate.
Cheers,
Ken
More information about the Python-list
mailing list