Live data from Hacker News

Ask HN: Oberon et al., vs. Rust

news.ycombinator.com

11–20 of 40 posts

Re: Ask HN: Oberon et al., vs. Rust

#11
> about rust. Is it better than, for example, oberon, or it's descendents?

It's a completely different language with different focus and features. "better" depends on the requirements you want to solve with the language. Rust can do memory management at compile time whereas Oberon and its descendants (such as my Oberon+ version) use a garbage collector at runtime. Rust is much bigger and more complex than Oberon, but it also has features which make it more suitable for systems programming. Simpler is not automatically better. If a language is too "simple" (i.e. minimalist), the complexity often shifts from the language specification to the application code, requiring more boilerplate or "clever" tricks to solve complex problems.

And it was not only simplicity (as Vidar assumed), but Oberon indeed had a different approach to OO in that there were no bound procedures, but the idea was (as you can observe e.g. in the Oberon systems and in publication by Wirth an his PhD students) that "type extension" (i.e. inheritance) is used to create extensible message hierarchies, which then are polymorphically handled by procedures accepting a VAR parameter of the most general message type. In this handler, the messages are dispatched by the IS operator or the WITH or CASE statement. This has similar effects as e.g achievable by sum types, and interestingly is closer to e.g. Alan Kay's view of OO than the implementation found in Smalltalk-80 (notably, Wirth arrived at this message-centric model independently of Kay’s work in the Smalltalk lineage).

Re: Ask HN: Oberon et al., vs. Rust

#12

If you're curious about Wirth languages (Oberon is an example), then Ada is the one to explore. Standardized. Very mature. Proven track record. https://en.wikipedia.org/wiki/Ada_(programming_language)

Ada is superficially related with Pascal syntax, but definitely not a Wirth language (whether directly nor in spirit).

Re: Ask HN: Oberon et al., vs. Rust

#13
post #12

If you're curious about Wirth languages (Oberon is an example), then Ada is the one to explore. Standardized. Very mature. Proven track record. https://en.wikipedia.org/wiki/Ada_(programming_language)

Ada is superficially related with Pascal syntax, but definitely not a Wirth language (whether directly nor in spirit).

You're right that Wirth neither designed Ada nor is Ada in the direct Wirth line (Algol -> Pascal -> Modula 2 -> Oberon), but I think of Ada is very much a parallel branch (Algol -> Ada) and Wirth-influenced, but I would defer to your expertise.

Maybe the biggest difference between Ada and true Wirth languages is that it is not deliberately minimal.

Would you say that Ada sits close to Modula 2 philosophically, but industrial-scale?

Re: Ask HN: Oberon et al., vs. Rust

#14

When I see these subjects, I can't help but talk about the Odin Programming Language. It's been such a joy working nearly exclusively in Odin this year. The creator of Odin might have something interesting to say on this topic. vidarh said "Wirth was perhaps too ascetic in his insistence on keeping the compilers minimal, but you can fine less extreme versions carried on in extensions done in the PhD dissertations of…

> feels like a proper 21st century C language with Wirth's design ethos.

While Odin is a modern and capable language, it belongs to the "C-alternative" school (alongside Zig) rather than the "Wirthian" school (Pascal, Modula-2, Oberon). Odin, by design, retains manual memory management and allows pointer arithmetic. Oberon has a GC and very restricted pointer use. Odin's "joy" and "practicality" come from adding many features that Wirth would have considered "unnecessary complexity".

Re: Ask HN: Oberon et al., vs. Rust

#15
post #14

When I see these subjects, I can't help but talk about the Odin Programming Language. It's been such a joy working nearly exclusively in Odin this year. The creator of Odin might have something interesting to say on this topic. vidarh said "Wirth was perhaps too ascetic in his insistence on keeping the compilers minimal, but you can fine less extreme versions carried on in extensions done in the PhD dissertations of…

> feels like a proper 21st century C language with Wirth's design ethos. While Odin is a modern and capable language, it belongs to the "C-alternative" school (alongside Zig) rather than the "Wirthian" school (Pascal, Modula-2, Oberon). Odin, by design, retains manual memory management and allows pointer arithmetic. Oberon has a GC and very restricted pointer use. Odin's "joy" and "practicality" come from adding many…

ISO Modula 2 has manual allocation and deallocation: NEW and DISPOSE.

The ISO module SYSTEM provides pointer arithmetic with "ADR" manipulation.

Argubly, though, ISO Modula 2 is not exactly a Wirthian language any more but "Standardian".

Re: Ask HN: Oberon et al., vs. Rust

#16
post #12

Earlier quoted context omitted.

Ada is superficially related with Pascal syntax, but definitely not a Wirth language (whether directly nor in spirit).

You're right that Wirth neither designed Ada nor is Ada in the direct Wirth line (Algol -> Pascal -> Modula 2 -> Oberon), but I think of Ada is very much a parallel branch (Algol -> Ada) and Wirth-influenced, but I would defer to your expertise. Maybe the biggest difference between Ada and true Wirth languages is that it is not deliberately minimal. Would you say that Ada sits close to Modula 2 philosophically, but i…

Ada and Wirth’s languages (including Modula-2) represent fundamentally opposing schools of thought regarding language design, despite their shared ALGOL-60 heritage and partly related syntax.

Ada is in every aspect a much bigger and more powerful (e.g. concerning the ability of the compiler to assist you in writing safe low-level code) language than any of the Wirth languages. Wirth famously criticized Ada as being "uneconomical"; he believed that because Ada’s requirements were so "baroque" and contradictory, the resulting language was inevitably overloaded with features whose marginal benefits did not justify their complexity (https://archive.org/details/Computer_Language_Issue_09_1985-...). But when you e.g. study the Oberon system, you see that it depended on "tricks" (e.g. SYSTEM.PUT/GET, VAR ARRAY of SYSTEM.BYTE) which were not properly integrated in the language concepts and had to be used without any typechecking support by the compiler.

Re: Ask HN: Oberon et al., vs. Rust

#17
post #16

Earlier quoted context omitted.

You're right that Wirth neither designed Ada nor is Ada in the direct Wirth line (Algol -> Pascal -> Modula 2 -> Oberon), but I think of Ada is very much a parallel branch (Algol -> Ada) and Wirth-influenced, but I would defer to your expertise. Maybe the biggest difference between Ada and true Wirth languages is that it is not deliberately minimal. Would you say that Ada sits close to Modula 2 philosophically, but i…

Ada and Wirth’s languages (including Modula-2) represent fundamentally opposing schools of thought regarding language design, despite their shared ALGOL-60 heritage and partly related syntax. Ada is in every aspect a much bigger and more powerful (e.g. concerning the ability of the compiler to assist you in writing safe low-level code) language than any of the Wirth languages. Wirth famously criticized Ada as being "…

I see. Thanks for your explanation.

Re: Ask HN: Oberon et al., vs. Rust

#18

If you're curious about Wirth languages (Oberon is an example), then Ada is the one to explore. Standardized. Very mature. Proven track record. https://en.wikipedia.org/wiki/Ada_(programming_language)

Ada is Wirthian, but not a Wirth language. It's worth making the distinction because while its syntax and many of its semantics can be seen as coming from Algol and Wirth's line of languages in particular, he did not design it himself.

Ada is not even "Wirthian". There are similarities with Pascal syntax, but the philosophy is completely different (see my other comment).

Re: Ask HN: Oberon et al., vs. Rust

#19
post #11

> about rust. Is it better than, for example, oberon, or it's descendents? It's a completely different language with different focus and features. "better" depends on the requirements you want to solve with the language. Rust can do memory management at compile time whereas Oberon and its descendants (such as my Oberon+ version) use a garbage collector at runtime. Rust is much bigger and more complex than Oberon, but…

"Simpler is not automatically better. If a language is too "simple" (i.e. minimalist), the complexity often shifts from the language specification to the application code, requiring more boilerplate or "clever" tricks to solve complex problems."

..fascinating..

..it always comes down, again and again, to what is the problem you need to solve, and from there, what is the best solution. And at that point, once you have identified the problem.. in a way it's a toss-up whether you implement your own solution, or just happen to have heard of a solution to a similar or equivalent (or the same) problem, developed by somebody else. ..or how willing you are to dig in search of said hypothetical already-existing solution. And said hypotheticals must then themselves be evaluated, which also takes time.

Re: Ask HN: Oberon et al., vs. Rust

#20
post #11

> about rust. Is it better than, for example, oberon, or it's descendents? It's a completely different language with different focus and features. "better" depends on the requirements you want to solve with the language. Rust can do memory management at compile time whereas Oberon and its descendants (such as my Oberon+ version) use a garbage collector at runtime. Rust is much bigger and more complex than Oberon, but…

OO is a big issue here. Or rather, in general. I have read "The Art of Unix Programming", where a very big fuss is made over object-orientation. It's like they want to take a really big gun that means big business, and shoot it. Ever since reading that, I yelp whenever I see it mentioned, and squint in suspicion at the offender. So when a titan like Wirth endorses it.. ..there is obviously something of great importance that needs to be clearly understood, and that is -not- obvious.

The same thing when I see mentions of C++. Except that I haven't yet found endorsements of it from anybody of Wirth's stature. Sites like suckless really do not help.

Related: https://plan9.io/wiki/plan9/lfaq/index.html#HARDWARE_AND_SOF...

" Is it object-oriented?

No, not in the conventional sense. It is written in a strict dialect of ISO/ANSI C. In a wider sense, its general design of making all its ``objects'' look like files to which one talks in a well-defined protocol shows a related approach. "

Post reply on HN