Re: Why are byte ports "ports" as such?
Marc Feeley 14 Apr 2006 14:07 UTC
On 14-Apr-06, at 9:57 AM, John Cowan wrote:
>
>> I'll add something in the preamble saying:
>>
>> The tokens of the form ``foo:'' used in this document will be
>> called ``keywords''.
>> On Scheme implementations supporting SRFI 88, these keywords
>> correspond to the
>> keyword objects specified in that SRFI. On Scheme
>> implementations which do not
>> support SRFI 88, these keywords are symbols.
>
> Which is as much as to say that they need to be quoted on non-SRFI-88
> systems, as your followup notes. This is always a safe strategy,
> since a quoted keyword evaluates to itself.
>
> Keywords are controversial (if nobody else, I am making controversy
> about them!), and this otherwise satisfactory SRFI should not, IMHO,
> depend on their presence.
I could add to the spec that
On Scheme implementations that do not support SRFI 88, the
variables ``direction:'',
``char-encoding:'', etc are defined to evaluate to the symbol of
the same name. That is
(define direction: 'direction:)
(define char-encoding: 'char-encoding:)
...
This way these ``keywords'' don't have to be quoted, regardless of
support for SRFI 88.
I'll have to think about this some more but currently I don't see a
problem with that.
Marc