This sound complicated. Why not let life easier?
It all boils down to what can be parsed. An
if then is a particular kind of statement, an
if then else is a different kind. The parser relies on being able to find either
; or
else, and it uses that distinction to decide what it's looking at and how to continue: any suggestion that that should be "fixed" is a non-starter which is quite simply not worth discussing.
A number of the core developers and long-term users are, like myself, "refugees" from Modula-2 and are keenly aware of what's known as the "dangling else problem" and other Pascal shortcomings. It would be desirable to change the syntax to fix these, but it's quite simply not feasible since it would break backward-compatibility with Delphi and cause enormous problems to those of us who maintain older code... some of which dates back to Turbo Pascal and even older compilers.
One possibility would be a per-unit directive which mandated the Modula-style
if then else end rather than the Pascal-style
if then else. But that still wouldn't help people who refused to take the time to learn the fundamental syntax, or both lacked the background to understand why certain things are the way they are and refused to accept the guidance of those with more experience.
My own feeling is that Oberon is too restrictive, and while it was designed to be a systems programming language- and used as such by Wirth's research group- it is too inclined towards language "purity" at the expense of practical usability. Gutknecht wrote a paper on why "the best" languages generally weren't adopted, my own answer to that is that while a "pure" language might appear "obvious" to its designers it can be totally obscure to the remainder of the community.
Having noticed it discussed a few days ago, I would like to wrap up by mentioning Vector Pascal which is probably the last significant research effort using the Pascal syntax. My own feeling is that there are things which can usefully be learned from it, in particular that it would be desirable to distinguish between concatenation of strings and (dynamic) arrays and iterative addition of their elements.
MarkMLl