Subject: Re: #'format and string interpolation
From: Erik Naggum <erik@naggum.no>
Date: 1999/07/23
Newsgroups: comp.lang.lisp
Message-ID: <3141716559622313@naggum.no>

* David Bakhash <cadet@bu.edu>
| If you've ever used Perl for CGI scripts, you might see how a format
| string with over a dozen substitutions can become cumbersome to read,
| seeing a ~A and then traversing through the other ~A's to find out its
| index, and then to count down the list of &rest args to see which one
| goes there.  It's shameful in that context, though I'm sure that there's
| a simple enough fix.  If not, one can write a parser and a macro to do
| this stuff at compile-time, and I'm sure it's been done.

  string substitution has always been the wrong approach, but since you
  cannot easily build and use more advanced structures in Perl (or many
  other Unix tools), that's what you use, because it works most of the
  time.  when it doesn't work is when you have magic characters that alter
  the meaning of the resulting string.  Unix tools are rife with security
  holes because of this.  e.g., CGI scripts have to be careful when passing
  input strings to programs so they don't actually run other programs when
  some other program re-interprets the strings.

  building strings to be passed around and parsed at every junction in the
  data flow is probably the dumbest design ever created.  instead, build
  and use real data structures.  Lisp got this right, and the rest of the
  world hasn't, so there's no need to import their braindamage into Lisp.
  (Pierre R. Mai wrote what I had in mind on how to do this.)

#:Erik
-- 
  suppose we blasted all politicians into space.
  would the SETI project find even one of them?