bugModula-2 Compiler and Translator - Bugs: bug #44787, Existence of a lowercase mode is a...

 
 

bug #44787: Existence of a lowercase mode is a bug

Submitted by:  None
Submitted on:  Thu 09 Apr 2015 06:40:43 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 30 Apr 2015 10:39:43 PM UTC, comment #3:

Correction about pre-preprocessing. I meant the code processor that was mentioned.

David Egan Evans <sinuhe>
Project Administrator
Thu 30 Apr 2015 10:33:38 PM UTC, comment #2:

First, upper case is not for cheap syntax highlighting. It is for avoiding statement collisions from existing source texts, (Pascal originally only used upper-case letters, to be compatible with the restricted ASCII character set used on the CDC 6000), and keeps out of the way of user-defined variable, procedure, and module names (which are rarely upper-case).

As for lower-case being used for reserved words, I agree with you about using pre-processing. I think removing -upper-case, and making -strict the default, instead of preserving -upper-case as an extension, is the right thing to do.

David Egan Evans <sinuhe>
Project Administrator
Thu 09 Apr 2015 06:44:55 AM UTC, comment #1:

"multi-protocol" is a freudian error, it should be "multi-dialect".

Anonymous
Thu 09 Apr 2015 06:40:43 AM UTC, original submission:

Modula-2 does not permit lowercase reserved words. There is a reason why reserved words are uppercased. It is a form of stropping and a reminiscent of Modula-2's Algol heritage. Uppercase in Modula-2 means boldface just as stropping in Algol meant boldface. It is an encoding of boldface in plain text source files.

The benefit of encoding reserved words in this way is to guarantee that language extensions that introduce additional reserved words or predefined identifiers will not clash with user defined identifiers as long as user defined identifiers follow to the convention not to use all-uppercase. It also improves readability.

For this reason, any Modula-2 compiler/translator that offers lowercase reserved word recognition is violating the primary design philosophy of the language. No matter how one looks at it, this can only be considered a bug. It cannot possibly be seen as a feature.

This is a serious bug because it can break user defined source code. This bug should be fixed by removing the lowercase mode from the compiler altogether.

The correct way to go about showing reserved words and predefined identifiers in lowercase is by way of a source code processor that renders reserved words and predefined identifiers in lowercase boldface (or underlined or otherwise highlighted).

The Pygments source code rendering framework contains a multi-protocol capable plug-in for Modula-2 which allows rendering in Algol mode, where reserved words are rendered in lowercase boldface (optionally underlined) and predefined identifiers in lowercase boldface italic, following the style of the Revised Algol Report from 1963 which has since set a de-facto standard still followed to this day in scholarly papers. Anyone who would like to see their M2 sources with lowercase reserved words and predefined identifiers should use such a renderer.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sinuhe (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Apr 2015 10:33:38 PM UTCsinuheStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1