Subject: Re: Can I use Lisp?
From: Erik Naggum <>
Date: 06 Nov 2000 03:46:18 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Hallvard B Furuseth <>
| But it's the regular expression stuff which recruits people to Perl.

  Precisely.  If another language tried to acquire similar regular
  expression power, it would help recruit people to Perl, because that
  language is the embodiment of the idea that regular expressions are
  a good way to solve a huge number of problems.  It isn't.  They are
  good for a _very_ small number of problems, such as searching a text
  in a text editor or a file system, _interactively_.

| Me, for example.  Why not try to save them?

  Nah.  I'm not into saving random people from themselves.  If I were,
  I'd have to go shoot the cigarettes out of people's mouths.  That
  would just land me in jail, and nobody would come save me.  So there.

| They _could_ have been doing that in Lisp instead, and maybe Lisp
| could even save some of the regexp fanatics.

  Nope.  If you fall prey to the regular expression, you're damaged
  goods as far as I'm concerned.  There is redemption and the chance
  of englightenment, of course, but people who extoll the virtues of
  programming with regular expressions are about as interesting to
  listen to as those who extoll the virtues of street prostitutes.

| Sure, persistent regexpers would increase the percentage of _poor_
| Lisp programs and programmers.  Is that your objection?

  No.  I don't want people to think that regular expressions is
  something programmers should put in source code at all.  It is
  simply the wrong approach to programming text applications.  The
  regular expression is an excellent tool when searching for something
  _interactively_, so tools that accept regular expressions from the
  user are the only ones worth using, but if you don't have that whole
  interactive "if at first you don't succeed, cry, try again" feel to
  using regular expressions, you're doing something very, very wrong,
  because you never know when your regular expression sees a false
  negative or a false positive.  Such mistakes are populating the Perl
  world to an alarming degree, but they go virtually unnoticed.  If
  you spend all the time it takes to actually _know_ that you get the
  right results every time, you could have implemented a full-fledged
  parser and object-oriented representation of whatever it was you
  were trying to hack up with regular expressions in the first place.

  Does anyone remember where I parked Air Force One?
                                   -- George W. Bush