5 ms·
PCALL(P), P cannot have a return type You cannot handle handle exceptions in a block of code without extracting into a procedure... that cannot return anything
by illiarian 4y ago
PCALL(P), P cannot have a return type
You cannot handle handle exceptions in a block of code without extracting into a procedure... that cannot return anything.
Yeah, I doubt you can "do everything you can do with Java expressions.
And of course Oberon's syntax construction is more complex: you need to have an external variable that gets populated, you need to match on three different types etc.
- Rochus 4y ago> without extracting into a procedure That's a one second problem; just give back the value via VAR parameter; the design decision is well justified in the referenced article. > do everything you can do with Java expressions "exceptions", not "expressions"; what do you think one cannot do with the Oberon approach? > you need to have an external variable that gets populated That's the Pascal philosophy; even an index variable of a FOR loop has to be declared up front in the declaration section; either you like it or not; personally I prefer the in-place declaration approach, but the language would become much more complex and it doesn't make sense to just rebuild C++ or Java.
- illiarian 4y ago> That's a one second problem; just give back the value via VAR parameter Ah yes. "Just". And these people accuse other languages of having complex syntaxes or complexities in general. > what do you think one cannot do with the Oberon approach I think it's obvious what I wrote. You can't wrap blocks of code, to do that you need to extract it into a proc that among other things (like actual params passed to it needs an additional parameter) needs an awkward `out` parameter etc. Is the result sorta kinda equivalent to Javas? If you squint hard enough, yes > That's the Pascal philosophy; even an index variable of a FOR loop has to be declared up front in the declaration section I know the Pascal philosophy: create awkward verbose languages with useless constraints while claiming it's for the sake of simplicity. > but the language would become much more complex and it doesn't make sense to just rebuild C++ or Java. 1. There's nothing wrong with complexity 2. There a multiple languages that don't have Pascal/Oberon's constraints, decisions, and awkward workarounds which are neither Java nor C++
- Jtsummers 4y ago> 1. There's nothing wrong with complexity But you don't like the distinction between procedures and functions or different types of loops? Pick a side here.
- illiarian 4y agoI don't like people pretending that the language is simple, and commenters berating other languages for being complex while the language they promote and defend has quite a few of complex things and awkward workarounds for no reason.
- Rochus 4y agoThat's like ranting about wine instead of just ordering a beer ;-)
- illiarian 4y ago[flagged]
- deleted 4y ago[deleted]