John David Stone scripsit:

>         I wonder whether one of the reasons that Scheme standards have
> avoided requiring an arity procedure is that the most natural design for it
> in classical Scheme would involve returning multiple values -- a natural
> number indicating the minimum number of arguments and a Boolean indicating
> whether the arity is variable.

Perhaps.  I think it has more to do with the idea that procedures are
opaque objects allowing only one operation, invocation, and that how
they represent things is private to themselves.  As Steele says in the
Rabbit paper:

        It would certainly be possible to define other operations
        on functions, such as determining the numbers of arguments
        required, or the types of arguments and returned value, etc.
        (Indeed, after the dissertation was written, it was decided to
        include such an operator PROCP in [Revised Report].  The point
        is that functions need not conform to a specific representation
        such as S-expressions.  At a low level, it may be useful to
        think of invocation as a generic operator which dispatches on
        the particular representation and invokes the function in an
        appropriate manner.  Similarly, a debugging package might need
        to be able to distinguish the various representations.  At the
        user level, however, it is perhaps best to hide this issue,
        and answer a type inquiry with merely "function".

IIRC, a Rabbit-enhanced Maclisp Scheme interpreter had something like
five different representation for closures, all of them S-expressions
whose car was an atom naming a Greek letter.

[OT personal note:  When typing the above in from the scanned PDF,
and switching between windows every phrase or so to see what came next
(I'm using a small screen today), I realized how much my own style
of technical prose has been influenced by reading CLtL1 and this paper
almost 25 years ago.  Every time I guessed what precise words were coming
next before switching windows to check the PDF, I guessed correctly,
as if the words were coming from my own brain rather than Steele's.
I find that rather remarkable.]

-- 
It was impossible to inveigle           John Cowan <[email protected]>
Georg Wilhelm Friedrich Hegel           http://www.ccil.org/~cowan
Into offering the slightest apology
For his Phenomenology.                      --W. H. Auden, from "People" (1953)

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to