[Oberon] Identifiers and Capitalization

CFB Software info at cfbsoftware.com
Thu Mar 16 00:28:39 CET 2006

> -----Original Message-----
> From: oberon-bounces at lists.inf.ethz.ch 
> [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of John Drake
> Sent: Wednesday, 15 March 2006 8:57 AM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Identifiers and Capitalization
> Well the original convention avoided that
> problem since variables and constants were
> treated the same.  (They start with lower
> case).  Perhaps this problem was the reason
> for that convention?

That makes sense to me. It is also consistent with the 'Case' section of
the programming conventions published by Oberon Microsystems for their
BlackBox Component Pascal:

In general, each identifier starts with a small letter, except . A
module name always starts with a capital letter . A type name always
starts with a capital letter . A procedure always starts with a capital
letter, this is true for procedure constants, types, variables,
parameters, and record fields.

    null = 0X;
    DrawDot = PROCEDURE (x, y: INTEGER);
    PROCEDURE Proc (i, j: INTEGER; Draw: DrawDot);

    NULL = 0X;
    PROCEDURE isEmpty (q: Queue): BOOLEAN;
    R = RECORD
      draw: DrawDot

Don't use all-caps identifiers with more than one character. They should
be reserved for the language.

Missing from both Mossenbock's and OMS's definitions (maybe assumed to
be obvious) is the additional recommendation that the first letter of
the second and subsequent words of a multiword identifier are also

  DrawDot, toPage, topAge 

  Drawdot, topage

I have been using these conventions for a while and have found them

The best way to encourage users to conform to a preferred style is 

a) lead by example and be consistent

b) provide a Beautifier tool to help them

Chris Burrows
CFB Software

More information about the Oberon mailing list