[Oberon] Another Project Oberon RISC emulator

Colby Russell oberon at x.colbyrussell.com
Wed Sep 15 21:42:47 CEST 2021


On the compiler: nice job!  I feel that this is a bigger accomplishment,
because the emulators are comparatively easier to understand, whereas
the compiler implementation is quite dense (with "cross-cutting
concerns") in non-obvious ways, and the Compiler Construction book is
not always helpful--indeed, it sometimes provides false hope, since the
implementation and techniques for the O0 compiler are not the same as
those used for Wirth's "production" compiler.

 From your README:
 > This project is free and open source software licensed under the ISC
 > License. <https://github.com/fzipp/oberon-compiler/blob/main/LICENSE>

Note that this is not the ISC license!  The license linked from Wirth's
homepage and the projectoberon.com site is a mishmash of the ISC License
and the MIT License.  I don't know where it comes from exactly (was the
license text, incl. disclaimer, originally mashed up elsewhere and
applied to another project, and then copied/applied to Project Oberon,
or was the mashup original for Project Oberon itself?).  However, in the
absence of an answer, I have taken to calling it the "Project Oberon
license".

 > The functionality is implemented in Go as methods on types
 > (ors.Scanner, orp.Parser, orb.Base, org.Generator), not as free
 > functions in "flat" packages with package scoped variables. This is a
 > deviation from the original implementation, but it allows the creation
 > of multiple compiler instances

I learned the same lesson early as a programmer on "real" software
(instead of just homework assignments)--even when you think you really
*do* only need a singleton, it's a good idea to go ahead create what
C++, C#, and Java call "classes" that permit multiple instances of a
given blueprint, and then only ever creating one instance.  Even if it's
true that you really don't need multiple instances, the cost of doing
things this way and being wrong is so much lower (pretty much free)
compared to starting out using a singleton, then realizing you're wrong
and having to rework everything to allow multiple parallel instances.

-- 
Colby Russell



More information about the Oberon mailing list