|
|
|
|
|
by cyberax
418 days ago
|
|
You don't get it. Oberon doesn't allow multiple _returns_, not merely multiple return _values_. As in, you can't write "return val;" in the middle of a function. FWIW, I don't like explicit error handling in Go, but it's undeniably minimalistic and practical. |
|
In Wirth's introduction of Oberon-07, he specifically gave an example of an Oberon procedure with multiple returns, and the corresponding Oberon-07 version, where a single return at the very end is enforced and the only syntactically valid way of including a return.
A decision I disagree with, but again a very explicitly motivated design choice - Oberon-07 in particular reflected years of looking largely at what Oberon could do without to achieve something that cut down complexity even further without being too limiting.
It's too austere for me, but the consideration with which Wirth approached his language design is still something I admire.