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

Re: [Scheme-reports] Immutable list SRFI updated



Kevin Wortman scripsit:

> Sure. I guess my point is that a new data type can have either "proper
> disjoint type" or "works like lists" semantics, but not both at the same
> time. The SRFI document seems to be trying to have it both ways.

In a sense.  I just didn't see the advantage of having a separate inull type.

> I have had problems stemming from empty lists being indistinguishable from
> empty alists, so I advocate making new types properly disjoint. But since
> the spirit of this proposal is to be close to a drop-in alternative to SRFI
> 1, "works like lists" semantics might be appropriate in this case.

I think so.  You might be interested in my JSO (JavaScript Objects) library,
which is a specialization of alists; you can search the whole thing with
assq, but it also simulates a JavaScript prototype chain.  See
<https://code.call-cc.org/svn/chicken-eggs/release/4/jso/trunk/jso-code.scm>
(don't worry about the self-signed certificate, it's safe).

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@x
The penguin geeks is happy / As under the waves they lark
The closed-source geeks ain't happy / They sad cause they in the dark
But geeks in the dark is lucky / They in for a worser treat
One day when the Borg go belly-up / Guess who wind up on the street.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports