[comp.lang.modula3] the fifth change

muller@src.dec.com (Eric Muller) (03/16/91)

A few months ago, Greg Nelson posted an article describing twelve
changes that will be made to the language defined by the revised
report (he did not say what the name of the new report will be). 

The fifth of these changes is:

  1.5  The semantics of method overrides supplied at NEW time will be
  defined by the following rewriting:  

      NEW( T, m := P ) 
    
  is sugar for 
 
      NEW( T OBJECT OVERRIDES m := P END ).  


I think that the sugaring should be removed. My observation is that I am
not allowed to write:

	TYPE U = T, m := P;

but I have to write:

	TYPE U = T OBJECT OVERRIDES m := P END;

This means that the sugaring is allowed not on its own value but for
historical reasons. I believe that the Modula-3 history is still short
enough that the cost of changing existing code will be compensated by the
cleaner language.

Furthermore, 

	NEW (T OBJECT OVERRIDES m := M END, p := P)

where p is a method of T is really confusing. 

-- 
Eric.