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

 
 

bug #44789: Enhancement: cast, shift and rotate

Submitter:  None
Submitted:  Thu 09 Apr 2015 07:19:38 AM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 23 Apr 2015 03:42:43 PM UTC, comment #1: 

I'm happy to receive your patches. :)

David Egan Evans <sinuhe>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-23 sinuhe Severity3 - Normal 1 - Wish
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code