[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define and set! with multiple-values I think I've changed my mind.
- To: email@example.com (Ben A. Hyde)
- Subject: Re: define and set! with multiple-values I think I've changed my mind.
- From: Bob Kerns <firstname.lastname@example.org>
- Date: Mon, 04 Jan 93 15:47:53 -0500
- Cc: email@example.com
- In-reply-to: Your message of "Mon, 04 Jan 93 10:47:38 EST." <9301041547.AA01968@gensym.com>
Date: Mon, 4 Jan 93 10:47:38 EST
From: firstname.lastname@example.org (Ben A. Hyde)
As far as I know it is not possible to implement safe
multiple values with out requiring many functions also set a value
(defun foo (x)
(+ x x))
must set the value count to as well as do the tiny bit of work
required to do the addition. Meanwhile
(defun bar (x)
doesn't have to set it.
There are several techniques. One is to tag the return value
count with the stack-frame that it's targeted for. Functions
which pass through multiple values simply re-tag. Calling
for multiple value clears the tag before call, in case some
earlier call left an identical tag. If the caller doesn't
see its own stack level, it ignores the indicated count,
and knows that the called function returned exactly one value.
I like multiple return values. I find them elegant and pleasant to
use. In systems I've built we have used them with great satisfaction.
It would be very sad to see them removed from Dylan, but I would be
more likely to adopt Dylan if it didn't have multiple return values.
It would be sad if you didn't adopt Dylan because of an
erroneous assumption about the cost of a feature you