On Fri, 2009-09-11 at 19:21 -0400, John Cowan wrote:
> Thomas Lord scripsit:
> 
> > In Scheme, one difference of significance is mutability (yes I know you
> > like to tilt against that windmill).  Another is what `equal?' does.
> > Another is a convenient (non-essential but convenient) disjointness.
> 
> Ah.  All of these are easily disposed of by a trivial SRFI 9 wrapper:


Yes, a core facility to create user-created 
disjoint types and some work putting in a
metaobject protocol / generics is a good
essential feature.  Not so sure SRFI 9 is the
right approach but, sure.

It's worth considering a special-case native form
of uninterned symbols in some implementations just
because they tend to work out very nicely in the
implementation.

-t






> 
> (define-record-type uninterned-symbol
>    (make-uninterned-symbol string)
>    uninterned-symbol?
>    (string interned-symbol->string))
> 
> In order to extend "symbol?" to respond #t, you need to use
> something like the SRFI-99 record inspector:
> 
> (define true-symbol? symbol?)
> (define (symbol? x) (or (true-symbol? x)
>                         (and (record? x)
>                              (eq (record-rtd uninterned-symbol)))))
> 
> > I don't propose them for a core of Scheme.  I think they are a nice
> > feature to have around.
> 
> Fair enough.
> 


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

Reply via email to