ANN: Conditions and restarts in ANS Forth
Opened this issue · 0 comments
Sometimes, when I'm not making a fool of myself on c.l.f and ForthHub, I do actually write code. My Forth system project, https://github.com/alexshpilkin/after, seems to have stalled, but I thought I could release some developments from it in an ANS-compatible form to let people discuss and experiment. So, here goes...
[This announcement was also posted to c.l.f as q4s2v2$1lpd$1@gioia.aioe.org.]
This may be considered my response to Mitch Bradley’s implied challenge to come up with a Forth idea that wasn’t tried before (or at least that's how I took it... =) ). I have tried to implement in ANS Forth a condition and restart system in the vein of Common Lisp, Dylan, and Racket. If that seems too theoretical, the C2 wiki also points out that the DOS Abort/Retry/Ignore prompt is unimplementable on top of exception systems in every modern language except those three. The best high-level overview of the idea known to me is in Practical Common Lisp, and its originator Kent Pitman also wrote an in-depth discussion of the issues and design choices. My text instead proceeds from the lowest level up, describing parts of the code in corresponding sections.
Seeing as we’re already on GitHub, I won’t paste the (rather lengthy) description here and just invite you to read it in a repository. There’s a zillion ways to comment on or reply to something on GitHub, but I expect the most convenient one for other readers would be to comment on this issue.