[Oberon] NW programming style

John R. Strohm strohm at airmail.net
Tue Jul 12 14:40:16 CEST 2016


Layering.

At the lowest level, the mouse has three switches, ML, MM, MR.

One layer up from that, you get chords.

The moment you start talking about abstraction (by e.g. assigning named 
constants), you should start thinking about layers of abstraction, and NOT 
confusing the layers.

This was the real message in Dijkstra's seminal paper "Structure of the 
T.H.E. Multiprogramming System".  (It is best known for introducing 
semaphores.)

--John R. Strohm

-----Original Message----- 
From: Bob Walkden
Sent: Monday, July 11, 2016 1:13 PM
To: 'ETH Oberon and related systems'
Subject: Re: [Oberon] NW programming style

> -----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
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon 


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Oberon mailing list