Having done a fair degree of programming in Wirthwhile languages, I think the only main design decision that I think was a mistake was the variables at the top. I'm not sure of the value of seeing all of the variables used listed in one place, it has certainly led to me encountering a identifier scrolling up to determine the type then scrolling back down. When the variable is only used on a few consecutive lines it's…
The Titania Programming Language
21–30 of 68 posts
Re: The Titania Programming Language
#22This repo isn't even 24 hours old yet and it's on HackerNews... Just wow....
Re: The Titania Programming Language
#23If I get it right, Bill's language is considered for teaching purpose, which is also a goal of Wirth's languages, and for which these languages are well suited (especially for compiler courses). Also note that the name "Oberon" was not inspired by Shakespeare, but by the Voyager space probe's flyby and photography of Uranus's moons during the mid-1980s when the language was being developed (see https://people.inf.ethz.ch/wirth/ProjectOberon/PO.System.pdf page 12).
Re: The Titania Programming Language
#24This repo isn't even 24 hours old yet and it's on HackerNews... Just wow....
If the latter, I wonder how you can manage another programming language alongside Odin — anyway, thank you and great respect for both!
Re: The Titania Programming Language
#25Having done a fair degree of programming in Wirthwhile languages, I think the only main design decision that I think was a mistake was the variables at the top. I'm not sure of the value of seeing all of the variables used listed in one place, it has certainly led to me encountering a identifier scrolling up to determine the type then scrolling back down. When the variable is only used on a few consecutive lines it's…
Re: The Titania Programming Language
#26Very nice project, I'm a big fan of implementing Wirthian languages to learn compilers. Also, in true Wirth style, the documentation mainly consists of the language grammar :)
And I might plan on making this a recorded series of explaining how to make compilers from scratch with this language as a reference.
Re: The Titania Programming Language
#27Very nice project, I'm a big fan of implementing Wirthian languages to learn compilers. Also, in true Wirth style, the documentation mainly consists of the language grammar :)
It's a bit more than just the grammar, but I agree it's generally underspecified.
Re: The Titania Programming Language
#28Having done a fair degree of programming in Wirthwhile languages, I think the only main design decision that I think was a mistake was the variables at the top. I'm not sure of the value of seeing all of the variables used listed in one place, it has certainly led to me encountering a identifier scrolling up to determine the type then scrolling back down. When the variable is only used on a few consecutive lines it's…
Variables are at the top because:
- you immediately see them (so, perhaps, easier to reason about a function? I dunno)
- the compiler is significantly simplified (all of Wirths' languages compile superfast and, if I'm not mistaken, all are single-pass compilers)
However, I feel that Wirth was overly dogmatic on his approaches. And "variables must always be at the top" is one of those.
Re: The Titania Programming Language
#29> teach compiler development with Not trying to be confrontational, genuinely curious.. but why is this an area where you'd want a DSL? My initial reaction is : When I'm learning a topic, the last thing I want to be worrying about is learning the ergonomics of a new language I'm guessing there's a good rational I'm missing it'd be nice to see some piece of compiler related code in this language that'd be ugly in a ge…
Once students where proficient in Pascal, we could introduce compiler classes and, when sufficiently advanced, show what the Pascal BNF grammar looked like. So students had a complete picture of a language. Pascal's BNF grammar is very simple.
Also, Pascal enforces strong program structures (BEGIN, END, PROCEDURE, FUNCTION, etc). which helps to frame practical work.
Re: The Titania Programming Language
#30Remarkable that Bill is interested in a version of Oberon-07. It's even more minimalistic than the previous Oberon versions. I spent a lot of time with the original Oberon language versions and experimented with extensions to make the language more useful for system programming (e.g. https://oberon-lang.github.io/ and https://github.com/rochus-keller/oberon/ ). Eventually I had to give up backward compatibility to ge…
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).