[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme mistakes (was Re: nil)
I don't think it is a good idea to conflate vectors and functions or
continuations and functions. Since they have quite different semantics
properties it makes sense to have a syntactic marker so the code is
easier for people to read.
As far as what would be lost, in a good language you lose nothing. In a
language with poor capabilities for abstraction, some abstractions get
more verbose. That is, in languages with higher order functions you can
always abstract over vector assignment or continuation throwing with a
function, but sometimes you'll have to have funny case statements in
At Thu, 14 Aug 2003 14:23:00 -0400 (EDT), firstname.lastname@example.org wrote:
> That's the mechanics of the suggested changes, but why are they
> improvements? What is gained and would anything be lost?
> Why is it a good thing to make using a continuation object look less
> like a function application and also a good thing to make using a
> vector object look more like a function application?
> > He's suggesting that continuations should probably not respond #t to
> > procedure? (in other words, continuations should not have the same
> > types as procedures do).
> > And possibly you should have to write (something like):
> > (throw k v)
> > rather than:
> > (k v)
> > to invoke a continuation. That's the way that SML/NJ does it.
> > As far as vectors as functions, it means that the vector selection
> > operation becomes applying a vector (as a function) to a number.
> > Mutation would be applying it to two values, a number as index and new
> > value to store at that index.
> > Robby