[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Returning additional values from advertised functions



    Date: Wed, 18 Sep 1985  12:56 EDT
    From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
    To:   robbins@DEC-HUDSON.ARPA
    Cc:   common-lisp@SU-AI.ARPA
    Subject: Modification to LISTEN
    In-reply-to: Msg of 18 Sep 1985  11:07-EDT from robbins at DEC-HUDSON


        I would like to have LISTEN return two values. [...]

    Looks like a good suggestion to me.  It could be implemented in a
    completely upward-compatible way.

I am a little worried about this answer.  The existence of
the multiple-value-call special form means that no such change can
truly be made upward-compatibly.  The lisp I maintain has a number
of functions which return useful, additional values (though usually
somewhat too implementation-specific or marginal to be advocated as a
an enhancement for "official" cl) beyond those specified by GSSB, and
I am somewhat loathe to flush them simply for compatibility when I am
sure that most receivers of multiple values are either
multiple-value-bind/setq's.

I remember that at the time of the initial discussion of the cl
multiple-value scheme there were a number of people (kmp stands out
most distinctly in my memory) who advocated as rigorous checking in
receiving multiple values from calls as in receiving arguments to
calls.  Perhaps they were right.
As it stands, I think that anybody using multiple-value-call is
except in very constrained situations is probably Courting Lossage

Just a point to bear in mind....

[BTW I have been inconvenienced several times recently by the fact the
multiple-value-setq is not multiple-value-setf.  This is a somewhat
curious shortcoming, especially now that the All-New Fashion in lisp
code seems to be to entirely eschew setq in favour of setf] 
-------