Proposal: Case sensitivity

Formal

This proposal has been moved into this section. Its former address was: /standard/usage

This page is dedicated to discussing this specific proposal

ContributeContributions

ruvavatar of ruv [73] Case sensitivityProposal2018-11-03 13:15:53

Citation from meeting minutes 2016

Case insensitivity

This has always been left to system implementations, but does cause significant confusion to new users.

Many new and many popular programming languages are case sensitive. It seems that the issue for new users is not case sensitivity itself, but that in this case the standard names should be spelled in upper-case.

Personally, I would be against the requirement of case insensitivity in the standard. But it seems reasonable if the standard will require the capability of finding the standard words in lower-case as well as in upper-case.

Suggested changes

The changed fragments are emphasized with bold.

3.3.1.2. Definition names

The phrase:

Programs that use lower case for standard definition names or depend on the case-sensitivity properties of a system have an environmental dependency.

becomes:

Programs that use mixed-case for standard definition names or depend on the case-sensitivity properties of a system have an environmental dependency.

Perhaps it is also needed to mention that mixed-case means that some letters in a name are in upper-case and some in lower-case.

3.4.2. Finding definition names

The phrase:

A system shall be capable of finding the definition names defined by this standard when they are spelled with upper-case letters.

becomes:

A system shall be capable of finding the definition names defined by this standard when they are spelled with either upper-case or lower-case letters.

ruvavatar of ruv

Reference implementation

To support this feature, it is enough to just create the lower-case synonyms for the standard words.

Using full-fledged SYNONYM (that is going to be standardized), it can be done even as a standard code.

For simplicity, I would suggest to not require supporting [IF] [ELSE] [THEN] in lower case.

ruvavatar of ruv

This approach has the following issue with libraries.

A library can use upper-case names just as its own or just an old-fashioned style. And as a Forth system is not obligated to support lower-case access for the non-standard words, a program is compelled to use upper-case access to the words from such library.

A possible solution for a standard program is to create the lower-case synonyms automatically for all the new upper-case words after including such library.

Perhaps a better approach is to provide for a program a standard ability to explicitly control (turn on or turn off) lower-case access to the new upper-case words (in ASCII charset only).

ruvavatar of ruv

I wrote above:

To support this feature, it is enough to just create the lower-case synonyms for the standard words.

I was wrong. Actually, it depends on the system. It's probably enough only if a synonym will have the same xt as the original word. Otherwise synonym cannot help.


In general, this proposal is a halfway to encourage systems to support lower-case spelling as the the modern programming languages do.

GeraldWodniavatar of GeraldWodni

The committee considers this proposal formal and asks the author to change its status to "CfV - Call for Votes" whenever he deems it ready.

Formal
Reply New Version