[HN Gopher] Object-Oriented Programming in Oberon-2 [pdf] (1994)
       ___________________________________________________________________
        
       Object-Oriented Programming in Oberon-2 [pdf] (1994)
        
       Author : AlexeyBrin
       Score  : 62 points
       Date   : 2023-11-19 13:47 UTC (1 days ago)
        
 (HTM) web link (ssw.jku.at)
 (TXT) w3m dump (ssw.jku.at)
        
       | pulse7 wrote:
       | Author of this (Hanspeter Mossenbock) works on GraalVM.
        
         | pjmlp wrote:
         | His research students used to.
         | 
         | Recently I saw a book of his on .NET, is he still involved in
         | GraalVM?
        
       | boznz wrote:
       | PDF is thirty years old, and this is like the Third or fourth
       | post on Oberon in the past few weeks so just wondering why the
       | love? I mean as a study in programming languages its nice, but
       | you cannot program real-world programs like you can with other
       | pascal based languages like free-pascal and Delphi and if its
       | just for teaching then it seems no more developed than Turbo
       | pascal which is also free.
       | 
       | Did my training on Turbo Pascal and it was a missed opportunity
       | IMHO but come on somebody enlighten me here.
        
         | pjmlp wrote:
         | Imagine being in the mid-1990s, Windows 3.x is what most people
         | use on the PC, Windows 95 is around the corner.
         | 
         | Here is a full workstation graphical OS, programmed in a memory
         | safe systems programming language, with automatic memory
         | management.
         | 
         | The language is compiled to native code, originally, eventually
         | the system will evolve to a mixed AOT/JIT workflow.
         | 
         | The OS is heavily based on the ideas from Xerox PARC, primarly
         | in Mesa/Cedar[0][1], and brings them into the normal PCs,
         | specially with Native Oberon.
         | 
         | A mix of dynamic loading, REPL and mouse commands, gives an
         | experience similar to Lisp Machines/Smalltalk (like in Cedar).
         | 
         | Basically any public symbol from a module, can be called from
         | the shell, or via the mouse, and act upon selected text,
         | selected window, widget or take additional input.
         | 
         | When modules are changed and reloaded this affects the whole
         | OS, similar to those Xerox environments.
         | 
         | Rob Pike actually became quite a fan, hence with Rio and ACME
         | in Plan 9 are heavily influenced by how Oberon (the OS works),
         | and also carried into Inferno/Limbo afterwards.
         | 
         | All of this when outside Xerox PARC and ETHZ, almost everyone
         | was discussing about writing OSes in C (with exception of Apple
         | and Object Pascal, later C++).
         | 
         | The closest you would get to it today, is how Powershell
         | alongside .NET and COM permeate Windows, and even that fails
         | short as that is only userspace.
         | 
         | This is why many of us relate so much to Oberon, even if it
         | doesn't make sense in 2023, an alternative universe of systems
         | programming in GC based languages, coupled with a Lisp
         | Machines/Smalltalk like experience.
         | 
         | [0] - https://www.computerhistory.org/revolution/input-
         | output/14/3...
         | 
         | [1] - https://www.youtube.com/watch?v=z_dt7NG38V4
        
           | zozbot234 wrote:
           | > Imagine being in the mid-1990s, Windows 3.x is what most
           | people use on the PC, Windows 95 is around the corner.
           | 
           | Anyone recalls how slow and clunky Java applets were back
           | then? I think we all know why Oberon was ultimately less than
           | successful. Of course, the missing ingredient back in the
           | 1990s was memory safety _without_ relying on GC, what Cyclone
           | gives you and what was further developed by Rust.
        
             | pjmlp wrote:
             | Those Java applets were interpreted, and had nothing to do
             | with Oberon.
             | 
             | If you never used it, don't assume.
        
         | lboasso wrote:
         | I think Fogus was able to summarize it quite well in his "Six
         | works of Computer Science-Fiction" blog post [0]:
         | 
         | "Wirth's magnum opus is the quintessential example of Computer
         | Science alternative-history world-building."
         | 
         | Note that Oberon was not only the name of a programming
         | language, it was also the name of an innovative (at that time)
         | operating system. It is possible to program real-world programs
         | today in Oberon depending on the used implementation. For
         | example oberonc [1] is a compiler targeting the JVM and allows
         | you to leverage the JVM ecosystem by invoking Java code (or any
         | other language that compiles to Java bytecode). For more Oberon
         | implementations see [2]
         | 
         | [0] http://blog.fogus.me/2015/04/27/six-works-of-computer-
         | scienc...
         | 
         | [1] https://github.com/lboasso/oberonc
         | 
         | [2] http://oberon07.com/compilers.xhtml
        
           | 082349872349872 wrote:
           | > _it was also the name of an innovative (at that time)
           | operating system_
           | 
           | it was also an example of a complete system (from hw through
           | os + dev tools to apps) which had been developed by only two
           | people.
           | 
           | I thoroughly enjoyed Wirth's excuse for an FPGA re-
           | implementation: "no commercial machines would talk to my
           | favourite mouse --given to me as a parting gift from my Xerox
           | sabbatical-- so I built a workstation that would"
           | 
           | (He once gave a slideshow of the workstations he'd designed
           | over the years, and although the displays got bigger, and the
           | cpu and storage got smaller, the mouse remained the same...)
        
       | abricq wrote:
       | I happen to work in Oberon pretty much every week. At my company,
       | we program OS for mobile robots and have been carrying Oberon
       | code since 25 years. The code base is huge, and it works really
       | well. It's been under production for all these years and we know
       | it's robust. It's definitely not fast, but most applications
       | don't require the speed offered by modern languages. That's why
       | it was never translated in C++ or Rust or any << better languages
       | >>.
       | 
       | In my daily practice, I find the following limitations to be the
       | most challenging ones.
       | 
       | * No generic type : that's extremely limiting, especially when
       | implementing math libraries.
       | 
       | * The garbage collector (using the XO2 real-time OS) does not
       | collect array of primitive types, only array of pointers are
       | collected. Honnestly it would be much easier to not have the
       | garbage collector.
       | 
       | * extremely small standard library (but this is to be expected
       | for a niche language ...).
       | 
       | * the only tooling that you have is the tooling that you build
       | yourself (editor, completion, debuting, etc ...)
       | 
       | I often wonder how many other people work in Oberon. I'd love to
       | share with someone else than me that does !
        
         | eterps wrote:
         | That's impressive! Are there still any advantages in using
         | Oberon commercially in 2023? (I use it mainly for study)
        
           | abricq wrote:
           | I don't think there is any advantage to start a new code base
           | in Oberon. The language itself is just like any OOP language,
           | with very pronounced limitations. Typically, you'll often
           | have to fix problems with the compiler, or with the OS.
           | 
           | I guess that sometimes the risk to make a language migration
           | (and to introduce some bugs) is higher than the performance
           | benefits.
        
             | eterps wrote:
             | Which Oberon compiler do you use?
        
         | krylon wrote:
         | Fascinating! I was skimming through TFA, wondering if anyone
         | actually uses Oberon for real. TIL: Yes, they do.
        
           | pjmlp wrote:
           | Astrobe is still in business, selling Oberon-07 compilers.
        
         | pjmlp wrote:
         | As I mentioned in another comment, it was very interesting
         | experience for what we had back then, as a full single user
         | graphical workstation OS.
         | 
         | Outside of its original environment, isn't quite the same.
         | 
         | Thanks for sharing your experience.
        
         | Koshkin wrote:
         | > _No generic type_
         | 
         | A _good_ macroprocessor can provide a similar capability (and
         | much more). My favorite example is to simply use an ASP-like
         | syntax, where you could have the same language as your macro
         | language, along with the  "code inversion" brackets ("<%" in
         | the case of ASP).
        
       | Narishma wrote:
       | (1994)
        
       | aquafox wrote:
       | Oberon-2 was the first programming language that we learned in
       | school, back in 2002. We used Pow! as IDE (http://www.fim.uni-
       | linz.ac.at/pow/pow.htm). Good times, implementing sorting
       | algorithms, Turing machines, and various backtracking algorithms.
       | And ofc playing GTA 2 when the teacher wasn't looking.
        
       | jll29 wrote:
       | It's amazing how readable the code in that book is compared to
       | C++, Java or even Rust.
       | 
       | Some non-idiomatic Python may come close in readability, but not
       | in type-safety, of course.
       | 
       | Decades on, Wirth and Mossenbock are still an inspiration against
       | bloatware.
        
       ___________________________________________________________________
       (page generated 2023-11-20 23:01 UTC)