[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What things return, and deserving to lose
- To: KMP at MIT-MC
- Subject: Re: What things return, and deserving to lose
- From: MILLER@MIT-AI
- Date: Fri, 27 Jan 79 23:54:47 GMT
- Cc: (BUG LISP) at MIT-AI, GLS at MIT-MC, NIL at MIT-MC
- Original-date: 01/27/79 19:54:47 EDT
You might note that (Print X) does not return X anymore. This was to
"protect us" from careless cons-ing, since when X was say a useless fixnum,
the complr would generate a useless Fxcons, etc.
However, since "we'd deserve to lose if we relied on the value", I always
end up doing either:
((lambda (yech) (print yech) yech) X)
or:
((lambda (yech) (print yech) T) X)
instead, anyway, depending on whether I want no value or the actual value.
(I hear this is Fortranish, now...) I used to use (ascii 0) instead of T,
but now this returns the (sometimes helpful) "||" (which really confuses
naive users of things built on Lisp!).
It is a bit embarrassing to go off into the "real world" and tell them how
elegant Lisp is, but then have to apologize about this kind of stuff.
Perhaps if complr were smarter about avoiding useless consing of return
values (perhaps GLS could think about this!) we could go back to the old
definition of things like (Print X) and win more.
In the end, cleanliness issues will win out over efficiency issues. [But,
if you've been relying on (Print X) to return X, you deserve to lose!]
Mark