I love how the author broke down the complexity of implementing DOES> in Forth it’s like peeling back the layers of an onion. The analogy with closures in JavaScript really resonated with me; it’s one thing to know what it does, another to know how it does it.
I’ve never built a Forth system from scratch, but reading this made me appreciate how DOES> truly straddles the line between compile time and run time, with its three time phases approach. The detailed step by step breakdown was illuminating, especially how the xt rewriting actually works at runtime.
The reflection at the end, about how JonesForth skipped DOES> probably because of the interplay between writable and executable memory, was spot on. It’s a great reminder that even simple seeming features in Forth can have surprisingly deep implementation complexity.
KlausWinter•3h ago
I’ve never built a Forth system from scratch, but reading this made me appreciate how DOES> truly straddles the line between compile time and run time, with its three time phases approach. The detailed step by step breakdown was illuminating, especially how the xt rewriting actually works at runtime.
The reflection at the end, about how JonesForth skipped DOES> probably because of the interplay between writable and executable memory, was spot on. It’s a great reminder that even simple seeming features in Forth can have surprisingly deep implementation complexity.