bugModula-2 Compiler and Translator - Bugs: bug #44789, Enhancement: cast, shift and rotate

 
 

bug #44789: Enhancement: cast, shift and rotate

Submitted by:  None
Submitted on:  Thu 09 Apr 2015 07:19:38 AM UTC  
 
Category: NoneSeverity: 1 - Wish
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 23 Apr 2015 03:42:43 PM UTC, comment #1:

I'm happy to receive your patches. :)

David Egan Evans <sinuhe>
Project Administrator
Thu 09 Apr 2015 07:19:38 AM UTC, original submission:

Contrary to popular believe, Wirth did not "invent" Modula-2. Instead, he took Xerox' Mesa language as it was and recast it in Pascal syntax to derive Modula-2. The only innovation he applied was the introduction of the SYSTEM module for unsafe language features. Unfortunately, Wirth did not consequently apply his own philosophy, several unsafe features remained in the language without requiring import from SYSTEM.

One such unsafe feature is the unsafe type transfer, aka cast operation. The ISO Modula-2 standard -- for all its failings -- corrected this particular shortcoming by replacing Wirth's innocent looking cast syntax with an explicit CAST function macro that had to be imported from module SYSTEM.

Wirth's PIM language report does allow for additions to module SYSTEM. Consequently, adding ISO's CAST function macro to a PIM Modula-2 compiler does not technically render the compiler non-compliant with the PIM standard.

Also, m2c already added ISO function VAL (safe type transfer) as a language extension. This should have gone hand in hand with adding CAST to module SYSTEM.

Also, for any serious low-level work, shift and rotate operations are required. Those should also be added to module SYSTEM. Again, this is entirely compliant with Wirth's PIM language description since it allows for unsafe language features to be added to module SYSTEM at the discretion of the implementor.

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):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Apr 2015 03:42:43 PM UTCsinuheSeverity3 - Normal=>1 - Wish
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1