[r6rs-discuss] Case sensitivity
jmarshall at alum.mit.edu
Mon Feb 23 20:07:00 EST 2009
On Mon, Feb 23, 2009 at 4:37 PM, John Cowan <cowan at ccil.org> wrote:
> Joe Marshall scripsit:
>> The biggest issue I had was that when PLT switched, I had to go
>> and edit a bunch of legacy code. Unfortunately, calls to READ in
>> PLT Scheme used the current dynamic value of the case-sensitivity switch,
>> rather than the lexical value apparent at the call site, so I had to go
>> find and edit all the calls to READ as well.
> That's a very interesting point: it's not obvious to me that READ should
> behave so. Just because my code is written in UTF-8, doesn't mean that
> by default I want all my text files to be opened as UTF-8.
The other option, where READ happens to use whatever dynamic value
the switch was last set to is clearly wrong. READ is going to need a
case argument. (And so is WRITE)
> Presumably by the time macro expansion is being done, all
> external representations have already been internalized, so
> (assuming down-folding) any external IF is already |if|.
Suppose I have a non-hygienic macro that introduces an identifier
named `Foo' and you wish to use it within a case-insensitive file.
If your external code has already been down-folded, it will never
be able to access the binding.
More information about the r6rs-discuss