[Oberon] A new dialect? Oberon+ (OBX)
skulski at pas.rochester.edu
Mon Jul 26 15:44:36 CEST 2021
>What do you think of these restrictions?
I am not sure why there need be any restrictions. If the language admits a character "A", then why not "_"? Both are provided with every known computer keyboard.
"-" is a traditional separator used in C and Component Pascal, for example. Why is it not allowed in Oberon? Is there a technical reason, or just a matter of faith?
Concerning the programming style, I do not believe in restrictions or enforcement. Looking at the OS code I am seeing long multistatement lines, murky identifiers ("vwr" is my favorite), lack of rules for capitalization, confusing names (both "W" and "w" used in the same code), numerical literals used in place of named constants (like 1, 2, 3 used for mouse buttons), and lack of separations of concerns in some modules (System.Mod being an example of a kitchen sink full of unrelated utilities). All of these are advised against by NM in his own teachings, and then used by himself and by others. Are you seriously proposing to improve the style by restricting the "_", without addressing any of the above?
>* identifiers with _ only allowed when SYSTEM is imported (* to underline the non-portability of this feature *)
>* an identifier with _ is not allowed to be exported (* to underline the locality of this feature *)
This I do not like, having in mind the "definition modules" like SysDef.Mod, FPGADef.Mod, SpiDevicesDef.Mod, etc. Such modules would export the constants but not code. There is a place for them in Extended Oberon, where the definitions can be imported by MODULE* (the bootloader module) to make the bootloader automatically consistent with the regular system. Such a consistency is technically very valuable.
So your proposition is on the collision course with the Andreas' implementation of the definition modules imported into MODULE*.
>* an identifier is not allowed to start with an _ (* changes in ORS are marginally easier *)
Aesthetics. Not sure why? I do not like the leading "_" myself, but why fight with this particular windmill?
More information about the Oberon