Remix.run Logo
cyberax 5 hours ago

> I still hope to see the world where Oberon is the future (and present) of OS and programming language design

I see you're into horror stories.

Oberon is absolutely a horrible language. It's an example of how you can screw up a good language by insisting on things that were important in 1960-s.

Like not allowing multiple returns (not multiple return _values_ but multiple returns).

jhbadger 3 hours ago | parent | next [-]

There's an argument (and I think a good one) that in structured programming there should be only one return per function. It's not that hard -- you just have a variable and you set it to what you want to return and the last line of the function returns that variable. I think that some things Wirth did with Oberon, particularly in the post Oberon-OS versions like Oberon-07, are a bit restrictive, but they are always in the service of making code easier to read, even if it makes it slightly harder to write.

cyberax an hour ago | parent [-]

The problem is that pure structured programming just sucks. It doesn't have a good answers for cleanups or error handling.

Structured programming was the answer to the earlier mess with unstructured gotos, but in the process of trying to improve it, structured programming became just as messy when taken dogmatically.

In real life, what matters is the mental load. Every ambient condition that you need to track adds mental load. Early returns/breaks/continues reduce it while in a "structured program" you have to keep track of them until the end of the function.

> It's not that hard -- you just have a variable and you set it to what you want to return and the last line of the function returns that variable.

And also have a flag "skip to return" to skip all the conditions. Or you end up mutating arguments of the function. I know, I suffered through programming on Standard Pascal.

Rochus an hour ago | parent [-]

It all boils down to the fact that ideas should be viewed as tools rather than dogmas, and famous people are neither infallible nor prophets simply because they had a few good ideas.

Rochus 4 hours ago | parent | prev [-]

Show me significant concepts implemented in today's languages which cannot directly be traced back to "things that were important in 1960-s" or seventies ;-)

cyberax an hour ago | parent [-]

"Traced back" is fine. We can trace back the size of the Shuttle's boosters to the width of the roads in the Roman Empire.

Insisting that the problems of 1960 are the only thing that matters, and MUST be solved dogmatically is not.

Rochus an hour ago | parent [-]

Well, a lot of ideas (and I mean really a lot) from the sixties are still very relevant today, and indeed, there are also problems discovered in the sixties still waiting for a solution. We don't have to live in the past, but many "new" things aren't actually new, or are not better just because they are new.