[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lexical syntax for boxes
Alan Watson scripsit:
> I presume the lexical syntax in Racket et al. is to give a weak form
> of read-write equivalence. Is this worth preserving?
What we really want is a general solution like SRFI 108, but it's way
too soon to consider that, I think. Maybe before the WG2 process is
over, maybe not. I don't mind standardizing things that haven't been
done before as part of this, but tampering with the lexical syntax tends
to be foolhardy, because people have such extreme visceral/aesthetic
reactions to it. For that reason, though I support SRFI 105 and SRFIs
107-110, I doubt if they will ever get traction despite being much
better than any of their dead and unlamented predecessors.
> It would be useful to define eq?, eqv? and equal? on boxes. (F/X: Can
> of worms being opened.)
The definition of eqv? in RnRS covers them well enough: they are eqv? if
the are the product of the same call to `box`, otherwise not. `Eq?` and
`equal?` by their definitions must agree with `eqv?`.
I have a proposal, not yet ready for SRFIfication, for a generalized
equality predicate that you can pass your own comparators to. See
<http://trac.sacrideo.us/wg/wiki/GeneralizedEqualCowan> if you are
curious about it.
> What is the justification for including optional behaviour? I
> understand how I work with optional libraries, since I can test for
> them, but how to I test for auto-boxing? Do you propose to define a
> feature identifier? Is this useful enough to warrant inclusion? Which
> implementations have auto-boxing?
None as yet.
As I see it, the primary purpose of this sort of thing in RnRS is to
inspire implementers. Many of them will simply ignore the suggestions,
as has mostly happened with the suggestions for promises in RRS.
But Chibi at any rate has a compile-time option for auto-forcing, because
Alex thought enough of the idea to put it in, so Chibi programmers
at least can take advantage of the feature, if they are willing to
recompile Chibi for themselves.
John Cowan http://ccil.org/~cowan cowan@xxxxxxxx
[P]olice in many lands are now complaining that local arrestees are insisting
on having their Miranda rights read to them, just like perps in American TV
cop shows. When it's explained to them that they are in a different country,
where those rights do not exist, they become outraged. --Neal Stephenson