It’s the second time i see this language mentioned on HN. Reading about it made me feel it was coming straight from the 80s, and i must say i didn’t find anything special in its feature set (but i didn’t spend a lot of time). Could anyone provide more info on what makes this language interesting ?
The language in itself is just a member of the Pascal/Modula family stripped to the minimum while still supporting modules and some form of polymorphic objects. What is interesting is what Wirth et al does with it in the Oberon book (http://www.projectoberon.com): building a complete computing environment (including a kernel, compiler and GUI) running on their own CPU. All in 9000 lines of Oberon code, no C or anything else.
Just started reading the book and so far it is quite interesting and informative and it looks like the problem they were trying to solve were that of the massively complicated operating systems which seem to get in the way rather than help. Funny how that resonates just as much today as then.
I have the digilent board from my FPGA experiments and Oberon looks like pascal so should be pretty easy to pick up so I might give the examples a go.
Unfortunately VGA graphics and PS2 keyboards and mice seriously dont cut it these days
Active Oberon is one of the final evolution paths that started with Mesa/Cedar at Xerox PARC and influenced Wirth's work on Oberon.
A full workstation OS, written in a strong type safe GC enabled systems language, providing UI interactions similar to Lisp and Smalltalk workstations from Xerox and Lisp Machines.
All of this in the mid-90s, where most PC users where still running Windows 3.x on their computers and Amiga was mostly coded in Assembly.
Active Oberon is a small but powerful language with a lot of good ideas within the language.
One of the interesting additions over plain Oberon is the concept and support for active cells. Active Cells provide an abstract mechanism to define systems composed of computing elements that exchange information over message channels. Not new to anyone familiar with Go Channels etc buts its one of the nice things in Active oberon and provides support for both Actor models, concurrency and parallel programming.
I have compared both Modula-2 and Oberon-2 to Go, but have not compared Active Oberon to Go.
This was for purposes of creating a top-down, predictive, recursive descent parser for Go.
I am curious on how Go is being parsed. LR, LL, or ?
I am also curious about the CellType and PortType of Active Oberon. Do these correspond to Go's ChannelType and possibly to OCCAM and CSP Send and Receive Channels?
(Only tangentially related to the OP, but what the hell.)
Does anyone here have an experience programming in Oberon-07? One of
the most interesting features of the language for me is the fact that it
doesn't have a BREAK statement. Which means that one must use a form of
WHILE for linear searches. Probably to force people to think in terms
of structured programming instead of the logic of “hidden GOTOs”. Does
it ever bother you? Did you ever had a thought like “Sheesh, this would
be so much better with a FOR and a BREAK.”?
> Of course, but wouldn't that effectively defeat the purpose of removing BREAK/EXIT in the first place?
Personally, I do like having BREAK/EXIT, but in the eyes of structured programming purists, a loop with an explicit conditional still has a single entrance and single exit, while BREAK/EXIT statements destroy this property.
On a tangent to your tangent: the `while` and `for` loops in Ocaml also do not have a `break` statement. Early exits are typically achieved by raising and catching an exception (which fortunately is quite efficient in Ocaml).
Whereas usually loops have 2 tests for checking if the while loop should end (end-of-data-reached? or break-condition-is-true?) you only need to check for the latter.
This is a very Oberonesque programming optimization.
I'm sorry, but I don't see how that answers my question. Oberon-07 has
real FOR loops over arrays, so it doesn't need sentinel values. My
question was about an idiom like:
WHILE True DO
(* Stuff. *)
IF someCondition THEN
EXIT;
END;
(* More stuff. *)
END;
My guess is that Wirth's approach would be to avoid having too much logic in a loop (if really necessary, break it into separate procedures) and if needed to do something like
WHILE ~someCondition DO
(* Stuff *)
IF ~someCondition THEN
(* More stuff *)
END;
END;
In general from a quick look at the projectoberon.com source code (which is largely written by Wirth) the vast majority of WHILE and REPEAT uses seem to be less than 4 lines long.
I answered for a sub space of all the possible problems that can be solved with LOOP and EXIT which lend themselves to a much better structured approach.
Also, you were jumping to FOR loops over arrays. But instead the sentinel values are much better suited for linked lists.
What a programming language allows shapes how you program in it. The Sapir-Whorf Hypothesis is probably much more true with programming languages than natural languages.
One of Wirth's mantras is "don't show me your code, show me your data structures and I'll immediately know if your code is any good".
There are certainly moments when I would like to have certain programming constructs. But then I have to solve the problem in another way.
But this happens in a lot of languages. Be it C, Ruby, Javascript, or Oberon (whatever version).
Compared to the Oberon in http://www.projectoberon.com this is like Oberon++. I mean, it's still a pretty bare bones language, but it has added quite a few fancy features.
Right. The whole point of Oberon is being as simple as possible. If you need all the fancy stuff introduced with Oberon-2 or Active Oberon (which are not the same lange as the one designed by Wirth) then there are better alternatives, e.g. https://en.wikipedia.org/wiki/Object_Pascal, or Java, or C#.
No. It's not designed for that. It was designed as a minimal lanuage focussing at the bare essentials required to implement a minimal operating system with graphical user interface.
I posted the link to the overview page, because it provides more information about the PDF not being yet final and where to discuss further the issues until it gets the final seal of approval.