3 ms·
Blackbox / Component Pascal is not Wirth. As for the distinction between function and procedures, I halfway agree with you, with the caveat that having the com
by vidarh 5y ago
Blackbox / Component Pascal is not Wirth.
As for the distinction between function and procedures, I halfway agree with you, with the caveat that having the compiler enforce that you don't try to use the return value from something that isn't producing one is pretty consistent with the static typing of those languages. If you don't like it nothing stops you from declaring everything to be functions.
The iterations on loop constructs reflects trying to find the set that maximises clarity with the minimum amount of syntax. At the same time the early exit issue is complex - one of Wirth's guiding principles was to strip out things he was not sure had an unambiguously good solution for implementation of and/or that promoted bad practices. At the time of his earlier language designs, the issue of single exit vs. multiple exit was still hotly debated, and while mostly debated in terms of functions, it also matters for things like loops. When I studied CS, we got docked points on exercises if we didn't stick to single exit (which greatly annoyed me). The changes in Wirth languages reflects changes in consensus on those issues.
I don't agree with all of Wirth's choices (or I'd have been an active Oberon user, rather than predominantly use Ruby), but in terms of the principles his languages are designed by his decisions are very much understandable. I wish more language designers had such a clear vision of what they wanted to achieve.
As for Menuet, Menuet is substantially larger (several times the number of lines of code) than the original Oberon in terms of source, so if anything it contributes to the point of just how compact Oberon is.