Subject: Re: coerce for arbitrary types
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 10 Apr 2008 20:27:09 -0500
Newsgroups: comp.lang.lisp
Message-ID: <y4KdnRASNbTwI2PanZ2dnUVZ_qygnZ2d@speakeasy.net>
Albert Krewinkel  <krewink@inb.uni-luebeck.de> wrote:
+---------------
| The translation table for codons is currently specified using a special
| variable: I can't imagine any use case in which it is necessary to
| change the translation table often.  But allowing for a keyword argument
| is something I did consider -- and since it seems natural to you (and
| probably other people, too), I'll reconsider my design decission.
+---------------

Well, remember that you can always make the default value of a
keyword argument be a special variable [or some function of a
special variable, see below]. I use that a lot with output-formatting
functions, e.g.:

    (defun format-foo (the-foo &key (stream *standard-output*) ...)
      ...
	  (format stream ...stuff...)
      ...)

Or for HTML-formatting stuff the default might be
(HTTP-REQUEST-STREAM *HTTP-REQUEST*) instead of
*STANDARD-OUTPUT*, whatever.

-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607