[plt-scheme] `shared' syntax confusing

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Nov 10 09:02:58 EST 2008

On Nov 10, 2008, at 8:21 AM, Matthew Flatt wrote:

> [In other words, I don't know how to implement it.]

What Matthew is trying to say is that he can do this one special case  
but there is uniform algorithm.

>> And if you are going to have this limitation, why is the
>> line drawn at the listed forms?
> Adding `list*' sounds like a good idea.

I consider it somewhat whimsical to go beyond the list of immediate  
constructors and to allow functions that we happen to know are  
uniform in construction. What if someone says

  (define foo append)

  (shared ([x (foo (list 1) (list x))]) ...)

You can easily imagine generalizations of this. (A type system that  
specifies "constructorness" the way Sam'e specifies predicate power  
would help but it's all undecidable anyway.)

>> P.S. Wouldn't `let-shared' have been a more natural name?
> Yes.

Scheme uses way too many long names. I like 'shared'.

-- Matthias

Posted on the users mailing list.