[r6rs-discuss] [Formal] Drop enumerations library?

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Thu Nov 2 10:45:11 EST 2006


On Nov 2, 2006, at 9:13 AM, AndrevanTonder wrote:

> On Thu, 2 Nov 2006, Michael Sperber wrote:
>
>> Many procedures in many libraries accept arguments from a finite set,
>> or subsets of a finite sets to describe a certain mode of operation,
>> or several flags to describe a mode of operation.  Examples in the
>> R6RS include the endianness for bytes-object operations,
>
> But endiannesses are symbols in the current version, so the 
> abstraction is illusory in that case.  The document states
>
> "(endianness big) and (endianness little) evaluate to
>  the symbols big and little, respectively. These symbols
>  represent an endianness, and whenever one of the procedures
>  operating on bytes objects accepts an endianness as
>  an argument, that argument must be one of these symbols."
>
> In other words, one could write, e.g.,
>
>    (bytes-u16-ref b 14 'little)
>
> using QUOTE to break the abstraction by forging the enumerated values.

There is no abstraction to break and no forging going on in the 
previous example.  The symbol little is the symbol little, regardless 
of how you got it.

Aziz,,,




More information about the r6rs-discuss mailing list