XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] parsing markup with Perl

Is this issue specific to Perl.

There is an awful lot of regex based HTML parsing being done with PHP
in fact one could almost say it is the defacto language of choice for
it and I'd hazard that Python rather than Perl is the de facto 2nd
choice.

On Sat, Feb 8, 2014 at 2:20 PM, Michael Kay <mike@saxonica.com> wrote:
> They had unreadable code and it was driving them into the ground. My
> takeaway was that Perl as it stood then required infeasibly much commenting
> to be maintainable
>
>
>
> My only encounter with Perl was equally negative. I was called in as a
> consultant to rescue a system that had serious performance problems (like
> response times of two minutes for customers checking the balance on their
> accounts). It all turned out to be due to one module, written in Perl, which
> was doing regex-based transformations on XHTML pages. It took a while to
> work out what the 500 lines of Perl was trying to do, but in the end we
> rewrote it (using Java DOM, I believe - the project wasn't a good place
> right then for anything innovative) and solved all the problems at a stroke.
>
> Regular expressions seem to have two problems. The first is that they are
> unreadable. Anything but the simplest regexes are impenetrable to anyone
> reading the code, and often to the person writing it, which is why debugging
> is so hard. The second is that performance is highly unpredictable except to
> people who really understand the technology extremely well.
>
> I think we should treat Perl a bit like certain pesticides; something you're
> only allowed to use if you've been through the right training courses and
> have acquired a license, which has to be renewed every year by passing
> exams.
>
> Michael Kay
> Saxonica


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS