[r6rs-discuss] [Formal] Vector size in the read syntax

From: William D Clinger <will>
Date: Thu Oct 26 12:07:08 2006

I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors, and
this message should not be confused with the editors'
eventual formal response.

Aubrey Jaffer wrote:
> None responded to my critique of "Vector size in the read syntax".

True.

> Must I submit an anti-proposal to advocate its rejection?

No.

Just to make you feel better, I'll respond to your critique.

> What problem does this solve?

It is one of the two most obvious solutions to the portability
problem I identified in my earlier response: some systems,
by default, write vectors using a notation that other systems
cannot read.

> It can't be used in a Scheme program to initialize mutable vectors
> because literal constants are not mutable.

True, if we take "initialize" to mean "represent".

> As for reading in external data, it is rare that the tail of a vector
> being read will have a run of identical values.

True.

> The Rationale would apply just as well to strings as it does to
> vectors. Literal string constants are more common in programs than
> literal vector constants.

True.

> (define foo '3#((a b)))
>
> Is (eq? (vector-ref foo 1) (vector-ref foo 2)) ?
>
> If so, then it is not the same as '#((a b) (a b) (a b)).

Is there any language in either the R5RS or in the draft R6RS
that would forbid the following expression to evaluate to #t?
If so, please cite it.

    (let ((x '#((a b) (a b) (a b))))
      (eq? (vector-ref foo 1) (vector-ref foo 2)))

Will
Received on Thu Oct 26 2006 - 12:07:01 UTC

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