by gingerBill · 1y ago · 0 comments
But I am using Oberon-07 as base, and I might deviate from it quite soon too. But I won't be going in the direction of things like Oberon+ (which adds generic and OOP programming) or Micron which adds the entire type system necessary to interact with foreign code. I just wanted something to explain to people how to do tokenizing, parsing, semantic checking (not just basic types), and machine code generation, and this seemed like the best language to choose.
n.b. I know the name does comes from from the Voyager space probe, but I wanted to keep it directly related somehow, and Titania was the best fit. It's also a moon of Uranus, and there is a story relation to Oberon (Fairy King).
I am curious about your thoughts on var parameters (i.e. mutable references), as in:
proc increment(var x: int)
begin
x := x + 1
end
var i: int
begin
i := 10
increment(i) // i is now 11
endI would say it's probably not necessary to explain what the connection between Titania and Oberon is in the README. It's probably evident to most people?
And as I develop this, I'll tweak it more so that people can actually understand without having to know the full histories of Pascals or Oberons or whatever.
(Your grammar is missing a definition for proc_call, by the way.)
Also this isn't JS-style ASI technically speaking, and it won't have any of the problems either. The syntax for this language is different enough that it won't be a problem. Procedures don't even return things.