Re: [stack] Joy and code readability
John Cowan <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
fabio_cevasco scripsit: > Although I really like everything concatenative programming offers, I'm > somehow overwhelmened by it, in the sense that I find it more difficult > to read (and mentally execute) concatenative code without local > variables. You've identified two of the three techniques: write very short words, and put a comment on each word saying what it does. The comment doesn't actually have to be the name, however. The third technique is to use stack comments, in the style of the Joy manual, showing what's expected on the stack and what winds up on the stack, with names chosen where possible to show the expected types. In some concatenative languages, the compiler actually verifies these comments, but not in Joy. -- John Cowan http://ccil.org/~cowan [email protected] Economists were put on this planet to make astrologers look good. --Leo McGarry