4 ms·
God's multiple returns is, from someone whose primary language is Go for now, crap. See https://herecomesthemoon.net/2025/03/multiple-return-values-in-go/ http
by lelanthran 2y ago
God's multiple returns is, from someone whose primary language is Go for now, crap.
See https://herecomesthemoon.net/2025/03/multiple-return-values-in-go/ https://herecomesthemoon.net/2025/03/multiple-return-values-... which goes into detail.
- cyberax 2y agoYou 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.
- vidarh 2y agoOberon-07 doesn't allow multiple returns, though Wirth tended to favour single return. 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.
- cyberax 2y ago> A decision I disagree with, but again a very explicitly motivated design choice As I said, he cared more about ideology. Early returns significantly improve imperative code. They are not necessary in fully functional languages, where you can easily juggle with blocks of logic, but Oberon is not such a language. > It's too austere for me, but the consideration with which Wirth approached his language design is still something I admire. It was basically: "my way or you're expelled because I'm the emeritus professor here".
- vidarh 2y ago> As I said, he cared more about ideology. Early returns significantly improve imperative code. They are not necessary in fully functional languages, where you can easily juggle with blocks of logic, but Oberon is not such a language. His views on it are as much or little ideology as your views on it are. They are rooted in a view of design you clearly don't share. That's fine. With respect to early returns, I disagree with him too, but I understead why he dislikes them - they do affect reasoning about a piece of code, and Wirth cared deeply about the ability to reason about the code more than about convenience. You may not agree with that choice, but it's an entirely valid choice. > It was basically: "my way or you're expelled because I'm the emeritus professor here". That's extreme hyperbole, and just suggests you haven't read much of ETHZ's research output, which is full of dissertations and papers doing things Wirth didn't want in the standard Oberon. Including plenty of works he was the adviser for. And given that Oberon-07 wasn't released until nearly a decade after he retired, it's also nonsense.
- cyberax 2y ago> His views on it are as much or little ideology as your views on it are. They are rooted in a view of design you clearly don't share. That's fine. No. The practice of writing code has clearly shown that early returns lead to better structured code. It's not even disputable anymore. > they do affect reasoning about a piece of code, and Wirth cared deeply about the ability to reason about the code more than about convenience. Then he should have looked at functional languages, rather than missing the point of them completely. > That's extreme hyperbole, and just suggests you haven't read much of ETHZ's research output, which is full of dissertations and papers doing things Wirth didn't want in the standard Oberon. Including plenty of works he was the adviser for. OK. What are the superstar Oberon projects that are used by a large number of people? Can you name ANY? I don't know any, and I know unfortunately a lot about Oberon and its cult members. I am familiar with ETH research, and I actually employ an ETH professor, and an alumnus. I don't think I've seen any mentions of Oberon in their highest rated recent ETH research.
- vidarh 2y ago