What Could Object Pascal Look Like in 2030? (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
Mostly I've learnt a lot from building a compiler, in particular the back-end which I didn't have much experience with. But also I've started using Oberon more and more. My compiler targets the 65C816 processor, but I ended up porting the front-end to LLVM so that I had native oberon, and used it to build a number of tools, an emulator, and actually the compiler (there was a C intermediate step).
In the end I've started to really like Oberon, and I don't miss much from more modern languages. I did add some extensions so I have a very simple form of object-orientation, and used it to implement a UI toolkit similar to AppKit, but much simpler. Some of the modern language features add more complexity than they give in benefits. And sometimes it's just better to write code than learn a new language feature or library.
Plus it's a very readable language.
Replies (5)
What features do you have in mind?
Replies (1)
Actually the most minimalistic version is the one he made for his retirement project, Oberon-07. Oberon-2 (by Mössenböck et al.) had most features. My Oberon+ is a superset of all (original) Oberon versions.
While my interest got spiked initially by the original Project Oberon, I was more found of the paths taken by Component Pascal and Active Oberon, as language evolution.
Anyway, it was what initially opened my eyes to systems programming with GC enabled languages, and drew me into the rabbit hole of Cedar, Modula-2+, Modula-3 and co.
Replies (1)
I haven't dug into Oberon, because it's not quite Pascal enough for me to love it, and felt a bit heavier than I had hoped for syntax wise.
I'm enjoying Odin lately, and if I felt i had more time/use for Oberon I'd probably try driving it. But feel that as a "living" project Odin is more usable, it feels more constrained in syntax and concision than the larger Oberon project.
This is similar to like Genera/Lisp Machines, where I'd love to explore more (and even plan9, though that's less related to OS/Language integration in the way Bluebottle/A2 and Genera/Lisp Machines.
Of all things...
I also have a (unpublished) '816 focused language and compiler (me and the AI).
I'm keeping it pretty conservative, as the goal is to rewrite the compiler in itself, and have it self-host. But a fellow posted this [1] about "Micron", an Oberon inspired system language.
And I'm giving a keen eye to how it handles Interfaces. I'm not sure if it will really fit, but it's an interesting idea that should be reasonably cheap on the compiler, and have no impact on the runtime.
I must say having an introspective CPU simulator as part of your unit tests can really help with writing a compiler. Not only can you test that the code is generating what it's supposed to, you can test that the code actually does what it’s supposed to.
[1] https://news.ycombinator.com/item?id=50413266
Replies (1)
One breakthrough in the compiler was when I could start to use AI to interpret instruction traces, before that I was doing it by hand and it took a very long time. Now the AI pinpoints my errors very quickly, although I'm past that stage now and don't often come across compiler errors. I do this with an emulator, also written in Oberon.