Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I remember reading this link that went through them, but the link is dead now:

https://minnie.tuhs.org/pipermail/tuhs/2021-November/024695....

But a couple interesting things I remember hearing (though I'm not sure if they were in the linked page) were passing alternate return address labels to functions, and resumable exceptions (although Lisp and Ruby do have this).

Also, not that unique, but that no keywords are reserved, and so you can have variables named "if" and such.



I also wrote a language in which keywords are not reserved, called Leazy, during high school ( https://github.com/jochenleidner/leazy ), but just for fun.

It`s arguably a good idea to treat keywords as reserved, in order to avoid confusion and to write faster compilers.

No-one should (be able to) write confusing code like:

  if if = then then then = else else else = end end if
It's good to have a PL/1 compiler available to those that hwve legacy needs and that want to learn about the language, but it has been said it was overly complex (what I read about it sound like it was "the C++ of its time"). Since then, many language designers, at least the good ones (e.g. Wirth, Gosling), have recognized that less is more.


Thanks for sharing your old compiler and the source code listing for it, though I can't read the documentation in German.

Out of curiosity, how did you deal with the fact that for a top-down parser, 1 token of lookahead isn't enough to know if, say, you're dealing with an if-statement (e.g. "if x > 0 then ...") or an assignment or procedure call using a variable named "if" (e.g. "if = 1", "if(x, y, z)")?

I feel like the best solution would be an LR parser that reduced to an if statement only when seeing "if <expr> then" (and I saw you mentioned LALR and LL parsers somehow in your documentation), but you could also maybe use a backtracking top down parser.

I realize could read the source code listing, but I think it would be easier just to ask, and I might misunderstand it.


Would that be this, using the current version of the TUHS archive?

https://www.tuhs.org/pipermail/tuhs/2021-November/024695.htm...


Yes, that's it, thanks. I knew the site wasn't dead, so I was confused why the link seemingly was.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: