This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see CaseSensitivityArcfide in WG2's repo for R7RS-large.

Case­Sensitivity­Arcfide

cowan
2010-02-13 19:07:20
5history
source

Aaron W. Hsu's View on Case Sensitivity in Working Groups 1 & 2

Problems

Proposed Solution

Clarifications

The use of parameters in Scheme Core would affect any procedures called that make use of the reader. Specifically read would be sensitive to such parameters.

Rationale

I would like to avoid creation of "compatibility" layers in Scheme implementations that intend to break the default case sensitivity defaults. Since most code that needs to run or most legacy code that is important can be counted on to still run under their same implementations in this proposal, this actually improves the conformance and maintains a large body of backwards compatible source code without requiring modification. Such source code can easily be moved to systems with different defaults by using flags or modules. This is no more difficult than requiring special encantations in the target Scheme implementation. It is also standardized, so the user can easily make a library entirely portable in this regard by either using a flag or providing a module. Doing so is superior to requiring each implementation to have a unique encantation for calling the code with the correct behavior.

The use of a parameter allows for much nicer interactions with the reader at a Scheme Core level without complicating the semantics. It also means that you have more control at run-time of the reader without making this more complex. It permits an acceptable level of control in Scheme Core, while scaling up to phasing levels and procedural macros in Scheme 7.

Because it makes sense to specify more exactly certain behaviors in Scheme 7 than it does in Scheme Core, Case sensitivity should be enabled by default there, as it provides a more general behavior and is easier to implement. Additionally, it is more suitable in the context of Scheme 7's target audience.

Issues

Should case-sensitive interact with the flags? That is, if a reader or load call encounters a flag, should the parameter be altered? Should the parameter's value be altered only in the call or should it persist?

At the moment I am inclined to think that it is okay for the two to interact, and probably a good thing, provided that the extent of that interaction remains limited by the call. That is, the value of the parameter should be reset to the incoming value on return. This is because the scope of that flag should only extend to the end of the file, and should not have an effect on continuing computation in the environment that made the call.

Endorsements

John Cowan endorses this page, with the following exceptions: