Subject: Re: lisp-1 v lisp-2 (<whine>Can't we all just get along?...
From: (Rob Warnock)
Date: Thu, 29 May 2003 05:42:17 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
[Perhaps getting a bit silly here, but...]

Kent M Pitman  <> wrote:
|  (print '(defun foo nil nil)) 
| with no language context is going to either print

Which is what CLISP prints.

| You really want
|    (DEFUN FOO () #f)
| and that's going to be hard to achieve without some contextual knowledge.

Well, (unlike CLISP) CMUCL actually *does* print the CL version of that!

    > (print '(defun foo nil nil)) 

    (DEFUN FOO () NIL) 
    (DEFUN FOO () NIL) 

| [You might want to check whether you can tailor the pretty-printer to 
| do the right thing.  It has, or can be made to have, just about enough 
| contextual knowledge... I think.

I think so, too. See above.  ;-}  ;-}

| Then again, even the pretty printer is unlikely to get
|  (cons 'nil 'nil)
| right, since this probably should print as
|  (cons 'nil '())
| and I'm not sure it's really up to knowing what kind of argument
| every function needs or wants.]

FWIW, both CLISP & CMUCL print "(NIL)" for that.
[Or were you really asking about (quote (cons 'nil 'nil))?]


Rob Warnock, PP-ASEL-IA		<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607