3 ms·
I had a look at the Oberon+ language definition and noted that one of the most annoying Oberon shortcomings (as compared to Modula-3) still remain: ...from the
by DeltaMetro 4y ago
I had a look at the Oberon+ language definition and noted that one of the most annoying Oberon shortcomings (as compared to Modula-3) still remain:
...from the point of definition to the end of the scope...
Oberon+ should have a look at Active Oberon 2019, not for its "active" aspect, but for its syntactical and semantic improvements, like the correction of the above problem.
- Rochus 4y ago> ...from the point of definition to the end of the scope.. Not sure what you mean. Is it about the fact that all variables are declared in the header of the procedure, i.e. not somewhere in the body as e.g. in C# or Java? This is actually the same with Active Oberon and Modula-3. In case you mean that the order of declarations is relevant, Oberon+ assumes at least a two pass parser by design; a declaration sequence can contain more than one CONST, TYPE and VAR section in arbitrary order, interleaved with procedures, and the order of declaration is not relevant; see e.g. https://github.com/oberon-lang/specification/blob/master/The_Programming_Language_Oberon%2B.adoc#4-declarations-and-scope-rules https://github.com/oberon-lang/specification/blob/master/The... and https://oberon-lang.github.io/2021/07/16/comparing-oberon+-with-oberon-2-and-07.html https://oberon-lang.github.io/2021/07/16/comparing-oberon+-w...
- DeltaMetro 4y agoSorry, but I read in your documentation: The Programming Language Oberon+ .... 4. Declaration and Scope Rules .... The scope of an object x extends textually from the point of its declaration to the end of the block (module, procedure, or record) to which the declaration belongs and hence to which the object is local
- Rochus 4y agoThe spec is a work based on the original Oberon-2 spec; I tried to not change too much; in the referenced section I just replaced point 3 (pointer forward declaration) by "The order of declaration is not significant" and thought it was clear enough; apparently not, so I will add some clarifications. At some point I will have to re-write the whole spec.