[r6rs-discuss] Sharp questions and things like bytevectors

From: r6rsguy at free-comp-shop.com <r6rsguy>
Date: Tue, 26 Jun 2007 01:03:25 -0400

> From: ludovic.courtes at laas.fr
> Subject: Re: [r6rs-discuss] Sharp questions and things like bytevectors
>
> r6rsguy at free-comp-shop.com writes:
>
> > So here's the modest proposal:
> >
> > <datum> -> <lexeme datum> | <compound datum> | <special datum>
> > <special datum> -> <reader prefix> <datum>
> > <reader prefix> -> #:<identifier>
> >
> Isn't this basically shifting the problem one character further? :-)
>
> Thanks,
> Ludovic.

It would be if all were characters were created equal, but
in fact, except for a few special cases (like ":-)":-)), we
like to make words out of letters, rather than random
punctuation.

We could say that the #\v in is just a meaningless character.
In that case:

<special datum> -> <reader prefix> <datum>
<reader prefix> -> #V<identifier>

so bytevector literals could look like:

  #Vbytevector(0 42 #xFF)

We could say that #\v stands for "vector". In that case:

  <vector datum> -> <vector prefix> <list>
  <vector prefix> -> #V<identifier>

  #vbytes( ... )

and bytevector changed to vector-bytes or vector-of-bytes.

Somebody will want to re-write SRFI-10 quickly so as to grab
another discriminator character before they are all gone.
If that charcter is not a #\V, then #vu8 will not fit.
It seems awkward to interpret #Vu8( ... ) as a read-time
application of u8 to the following list, when the
resulting value need not even be a vector.

I am trying to see the lexical syntax for #vu8 as
fitting into a general pattern that can be continued
in future SRFI's and Reports.

    -- Keith
Received on Tue Jun 26 2007 - 01:03:25 UTC

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