[Oberon] Oberon Digest, Vol 84, Issue 3

Bob Walkden bob at web-options.com
Mon Jan 10 20:06:14 CET 2011


> > I also found that in the Oberon07 reports that the WITH statement is
> > omitted, however there is no explanation why this was done. From the
> > examples of the Wiki pages I could not conclude myself why leaving
> WITH
> > out of the language was a good thing.
> 
> NW explained why there is no WITH at the time of Oberon[-01].
> sorry, I don't have a link; maybe it was in his 'differences between M2
> and Oberon.'
> 
> anyway, he said WITH is not needed. to understand that,
> one must go back to the reason he introduced it in M2,
> which was because he tought it could be used for code
> optimization - maybe [even] via hardware support (MMU).

there was a WITH statement in early Oberons which was used as a type guard /
cast. 

It differed from the Modula-2 WITH statement, which was a way to avoid
writing the record name against every component of the record.

eg VAR r: RECORD
		a,b : CARDINAL
	END
...
WITH r DO
	a := b
END
instead of R.a := R.b;




More information about the Oberon mailing list