| |
comp.lang.scheme |
In a series of threads back in January 1995, Matthias Blume argued (define (compose f g) rather than in the simpler and more obvious way. Matthias felt that the Matthias (and many others) seemed to feel that this was an extremely Another justification given for values/call-with-values was that they William Clinger argued in favour of values/call-with-values for some My questions: 1. Is this proposal still viable for Scheme, as a language, today? 2. What are the thoughts of implementors on the proposal? 3. Have people really resigned themselves to values/call-with-values, 4. Does anyone have any other ideas for dealing with the problem of --
passionately against the presence of values/call-with-values in Scheme
on the grounds that they add nothing to the language as a language -
that is, they grant no additional expressiveness beyond what is already
possible with list and apply, and in fact detract from expressiveness by
forcing us to write things like function composition as
(lambda args
(call-with-values
(lambda () (apply g args))
f)))
introduction of these constructs was a divergence from Scheme's spirit
of orthogonality and challenged Schemers to come up with an argument
justifying their inclusion in the language. The sparks flew, and the
results appear to have been that most people agreed with Matthias Blume,
with the notable exceptions of William Clinger and Kent Dybvig. The
primary arguments in favour of values/call-with-values were that they
allow implementors to optimise generated code in ways that are
impossible or more difficult in the list/apply case.
suspect reason for altering the foundations of Scheme, and that it
amounted to sacrificing the spirit of the language for a "performance
hack."
create a symmetry with the multiple arguments accepted by procedures.
Matthias countered by stating that there was no need to have procedures
accept multiple arguments at all and that Scheme could learn from
languages like ML in this respect.
time. But in February 1995, in <3gr4ls$...@narnia.ccs.neu.edu>, he
appeared to have second thoughts of a sort. He writes:
> been trying to make. As I now understand his arguments, Matthias has
> not been criticizing the multiple values proposal. Instead he has
> been criticizing various misfeatures of Scheme that make multiple
> values appear necessary.
> [...]
> I will then outline some changes to Scheme that would make multiple
> values unnecessary. These changes are radical, yet they would not
> break any code written in R4RS Scheme.
> [...]
> This proposal would address all three of the above criticisms without
> breaking *any* portable Scheme code. On the other hand, this proposal
> would require changes to all existing implementations of Scheme.
'sequence'. With this approach,
> result. The argument and the result will always be a sequence. [...]
> An expression in tail-recursive position returns a one-element
> sequence. Continuations accept sequences containing an arbitrary
> number of elements as results.
it seemed to mark the end of the original one, and since then people
seem to have resigned themselves to values/call-with-values, occasional
fulminations aside.
both
a) as a specific means of handling multiple return values, and
b) as the philosophical departure from the roots of the language
they (arguably) represent?
multiple return values that haven't been raised yet?