A mathematical foundation of reflexion?
Thu, 13 Jan 2000 21:11:15 -0500 (EST)
On 14 Jan 2000, Laurent Martelli wrote:
> With one function, you read the program sequentially. As long as you
> can remember the first line you are reading the last one, it's OK.
> With 10 functions, you'll have to mentally emulate the call stack each
> time you encounter a function call. This requires more concentration,
> I think. Especially when you have big depth of the call tree.
Whenever you do the same thing more than once, it's easier to read when
it's factored out. Easier to modify, too. At least that's my experience.
Also, when your functions are short, the stack tends to stay small. I
have to side with the Forth gurus on this.. their advice has borne out.
A good rule of thumb: A function should fit on one screen, so you can see
the concept without scrolling. That's good style, in any language.