[Corpora-List] What is best for text processing Perl of Python?

John F. Sowa sowa at bestweb.net
Sat Mar 15 17:46:28 UTC 2008


Steve Finch wrote:

 >> ...many of the individual computational operations you want
 >> to do in language processing [are] expressible in little more
 >> than 1 line, and effortlessly well implemented.

Mike Maxwell wrote:

 > Being a Pythonite ... I would say that the ability of Perl to
 > express such operations in one line is both its benefit and
 > its shortcoming.  Personally, I can't understand my own code
 > a month after I've written it (comes with olde age), and I
 > would much rather take a dozen lines and comments to code
 > some operation, so I can understand later what I did.

I strongly agree with that statement.  Of all the languages
currently popular, I would agree that Python is one of the best
for teaching beginners *and* for continuing to use indefinitely
for many serious applications.

A very different language, which I would also recommend for teaching
beginners (but for different purposes than Python or Perl) is Prolog.
Like Python, Prolog can also be used indefinitely.

I don't want to get into arguments for or against any particular
language(s), but I would suggest the following guidelines for any
programming language that would be used by people who are not and
do not intend to become professional programmers:

  1. Easy to learn and use by a beginner.

  2. Sufficiently rich and robust that anyone who begins to use
     it can continue to use it indefinitely for serious projects.

  3. Sufficiently readable that programs can be read by other
     users (including the original author at some later date).

I'll admit that Python probably satisfies point #3 better than
Prolog, but it is possible to write Prolog in a way that makes
it fairly readable.

John Sowa


_______________________________________________
Corpora mailing list
Corpora at uib.no
http://mailman.uib.no/listinfo/corpora



More information about the Corpora mailing list