[Oberon] ETH Oberon: file names.
Hans Klaver
hklaver at dds.nl
Fri Dec 9 15:56:18 CET 2022
On 8 Dec. 2022, at 17:37 peter at easthope.ca wrote:
> Another question. In _The_Oberon_System_ Martin Reiser stated,
> 2.7 Naming
> Oberon provides structured names to identify objects such as files,
> servers and viewers. Tha syntax of names is:
>
> Name = NamePart { "." NamePart }
> NamePart = Letter { Letter | Digit }
>
> ========
> In comparison to Linux, that syntax seems more restrictive than
> necessary. For example the underscore appears frequently in Linux file
> names. Reconciliation of names is a bothersome detail when moving
> files between systems. Is the syntax in Oberon just a consequence of
> the general principle of simplicity? Something more subtle?
I guess the restriction within Oberon (the language) and within Oberon Systems is more a matter of readability (and then ultimately of taste and style).
I personally find:
In "The Oberon System" Martin Reiser stated, ...
more readable than:
In _The_Oberon_System_ Martin Reiser stated, ...
And likewise I prefer Texts.Mod.Bak over __Texts.Mod_bak
In the past at ETH this style preference was quite outspoken. E.g. in The Oakwood Guidelines on p. 17 (about proposals 3.6 for Underscores in identifiers and and 3.7 for ** as exponentiation operator) one can read the following:
"... Please note that Josef Templ and Prof Mössenböck of ETH are strongly against sections 3.6 and 3.7 being suggested as language extensions."
On the other hand, for interfacing with other operating systems exceptions can be made, even by ETH folks.
E.g. in the same Oakwood Guidelines on pp. 31 and 32 one can read about the specification In.Name ("proposed by H Mössenböck, ETH"):
"In.Name returns the name s at the current position according to the file name format of the underlying operating system (e.g. lib/My.Mod under Unix)"
So I would not be too rigid with allowing file names with underscores when writing Oberon I/O procedures for other operating systems than Oberon System, but I would be hesitant to introduce indentifiers with underscores within the *language* Oberon.
Regards,
Hans
More information about the Oberon
mailing list