I am interested in cheap ways to increase the quality of software development. One good way is formal proof, e.g. seL4, CompCert, CakeML. I'm curious if there's another way, to keep the software simple enough that code review is good enough. With this in mind, I enjoyed the 2013 revision of Wirth's “Project Oberon”. Here I try to use the minimal Oberon language for some “programming in the large” tasks.
First, you'll need to install an Oberon compiler. I can recommend the following ways:
- (If you're running macOS.) Install "Oberon" from the App Store.
- For UNIX or msys2 on Windows, install oberon-risc-emu.
- Buy some Oberon hardware, e.g. a Pepino.
There is also a good implementation of
For example, here is a trivial module in Oberon-07. And here is a port to voc. Note the following differences:
- Oberon-2 (which is implemented by voc) has the concept of
type inclusion. Oberon-07 requires calling
- Oberon-07 allows calling any public PROCEDURE with M2. voc targets UNIX programs, so you need to call the right PROCEDURE from the module's
That is only for this trivial example. There are several other incompatabilities. None of them are difficult to work around, but to start with I'd recommend limiting yourself to Oberon-07. As is often the case when choosing programming languages, it's largely a matter of taste, but I think I prefer Oberon-07. So even when I use voc (it seems to be the best compiler for UNIX) I eschew the Oberon-2 features. And unless stated otherwise, all sample code here is in Oberon-07.