[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Size of SET type
From: |
Gaius Mulley |
Subject: |
Re: Size of SET type |
Date: |
Mon, 27 Mar 2023 16:08:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
"Fischlin Andreas" <andreas.fischlin@env.ethz.ch> writes:
> Dear all,
>
> Benjamin is making excellent points I fully concur with and urge to consider.
>
> However, I use this opportunity to comment on another problem I have with gm2
> given some sample code in this thread. At the risk of repeating myself,
> strictly applying following capitalisation rules would make gm2
> code much more readable:
>
> 1 MODULE, TYPE, and PROCEDURE identifiers should always start with a capital
> 2 CONST and VAR identifiers should start with a lower case.
> 3 PROCEDURE identifiers should be based on a verb
> 4 TYPE identifier should be based on an adjective, adverb or a property
> describing noun.
>
> A similar additional distinction for CONST and VAR identifiers as given by
> rules 3 and 4 does not exist but is less needed as semantically rarely of
> relevance in Modula-2.
>
> These simple rules are a very useful and well established practice how to
> code in Modula-2 as it let’s one immediately understand what kind of object
> one is dealing with, in particular also in code sections that are far
> below the initial declaration. They have proven to be very helpful for
> efficient programming (reading, writing, checking correctness of code etc).
> It escapes me why gm2 seems to be plagued from C like or other habits
> that deviate from this helpful Modula-2 practice. A pity. BTW, for me this is
> the biggest turn off from gm2 and its library.
>
> Andreas
Hello Andreas,
many thanks for the suggestions - I'll add these guidelines to a new
section in the documentation - and migrate the source code to adopt them
(internally). It might be useful to have a -fm2-style option which
emits notes when [1] and [2] are violated
regards,
Gaius