[r6rs-discuss] Hashes in the number syntax

Jens Axel Søgaard jensaxel at soegaard.net
Sun Nov 19 15:14:08 EST 2006


William D Clinger skrev:
> I am posting this as an individual member of the Scheme
> community.  I am not speaking for the R6RS editors.
> 
> Jens Axel Soegaard wrote:
>> My understanding is that # to some degree means
>> "digit unknown". That is, an implementation
>> is free to parse 1## as any inexact number
>> between 100 and 199.
> 
> The # indicates an inexact number.  Although most systems
> happen to treat the # as a 0, the 1## notation is more
> specific than 100. because the latter doesn't tell you
> that the two zero digits are insignificant.

>> Is this syntax used by anyone?
> 
> I don't know.  IIRC, Sussman suggested this syntax, so
> it might be used more at MIT than elsewhere.
> 
>> I'd prefer the syntax is removed, since the syntax can
>> not be used in portable programs.
> 
> I don't understand that comment.  All R5RS-conforming
> implementations accept the syntax.  They may parse the
> syntax as different values, but the same is true of all
> notations for inexact numbers.

If 1## were specified to be read as #i150, then I could
see a use for the syntax. As is things are now, it can be
read as any number between 100.0 and 200.0 .

Most implementations treat is as 100.0, which seems
to be against the spirit of the notation. So in practice,
I'd write #i150 instead of 1## .

I looked for an explanation of the syntax # syntax
in R5RS and R6RS, but couldn't find any. If the notation
is worth keeping, it is worth explaining.

[I know that somewhere in the rrrs-list archive,
  the syntax is discussed.]

-- 
Jens Axel Søgaard





More information about the r6rs-discuss mailing list