[Oberon] NW programming style

Bob Walkden bob at web-options.com
Mon Jul 11 20:13:59 CEST 2016


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Richard Hable
> 
> Am 2016-07-11 um 17:13 schrieb Skulski, Wojciech:
> 
> > I was always amused by NW advocating high level programming, using
> > named constants rather than hard coding the numbers, etc. And then in
> > his published book Project Oberon the reader can enjoy seeing "1",
> > "2", and "3" meaning mouse clicks left, middle, and right. Which is
> > the exact opposite of the principles NW was teaching.
> 
> I don't think the master of simplicity ever advocated using named
constants
> in cases like this. It is not difficult to count to three when looking at
the
> mouse keys, and it wouldn't be possible to change the number assignment
> anyhow without breaking compatibility to central Oberon System modules.
> 
> > The grad students then cleaned the code in their Unix/Linux/Windows
> > ports of Project Oberon. They used ML, MM, MR meaning mouse left,
> 
> Students often exaggerate when applying the principles of their master. :)

ML, MM and MR aren't much better than 1, 2 and 3 anyway, since they refer to
the physical position of the buttons rather than to the semantics. The
semantics of the mouse should also include the chords.

B


More information about the Oberon mailing list