[r6rs-discuss] Re: [Formal] eq?/eqv? misbehave around NaNs [QNames]

From: Per Bothner <per>
Date: Sat Nov 25 14:48:22 2006

John Cowan wrote:
> Per Bothner scripsit:
>
>> In XPath/XQname you can create "free-standing" QName values
>> by separately specifying local-name, namespace-uri, and
>> namespace-prefix.
>
> So a namespace prefix is an essential property that is not
> part of the symbol's identity. Sounds like we need the
> return of the p-list.

I don't think that solves the problem: the namespace-prefix has
to be part of a QName's state (hence identity), but it
is possible (if unusual) for two different QNames that are
equal in terms of (local-name, namespace-uri) to have different
prefixes.

Unless you mean using unintered symbols. One could create
separate uninterned symbol objects, and associate uri and prefix
values with them. But you'd still need a separate QName-equal?
function that would be different from eq?

And the fundamental question remains: should eqv? and equal? on
QNames ignore the prefix or not?

> (Currently Chez has p-lists, though they are not mutable with
> general list procedures; Chicken can be configured to have them
> at build time. AFAIK no other Scheme provides them.)

Various other Schemes have alternate ways of mapping arbitrary
named properties with symbols (or other objects). For example
Guile. Kawa also has that internally, but I haven't nailed
down a Scheme API for it.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Sat Nov 25 2006 - 14:49:24 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC