3 ms·
Forth's necessity of carrying the stack in short-term memory while coding and debugging has seemed to me its deepest flaw as a tool for mortals.
by grout 14y ago
Forth's necessity of carrying the stack in short-term memory while coding and debugging has seemed to me its deepest flaw as a tool for mortals.
- RodgerTheGreat 14y agoHonestly, maintaining the stack in your head is a skill that can be learned with practice. In my own experience, it was very hard at the beginning but over the course of a few weeks it became second nature. You get used to idiomatic ways of doing things- arranging expressions so that they don't become deep, factoring words apart as a means of reducing the number of elements you care about in a given context, when to use a variable or two to untangle a complex expression. From the debugging side, well-factored code consists primarily of short pure functions with a very small number of code paths. This couldn't be a more perfect scenario for TDD. In my own projects I use an extremely simple unit testing system called the Test Anything Protocol (TAP). Here's an example of a fixture: https://github.com/JohnEarnest/Mako/blob/master/lib/Test/testMath.fs https://github.com/JohnEarnest/Mako/blob/master/lib/Test/tes...