Re: questions (about x21)
- To: Don Golding <angelus@xxxxxxxxxxxxx>
- Subject: Re: questions (about x21)
- From: Greg Alexander <galexand@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Jun 2000 10:38:23 -0500 (EST)
- cc: misc
- In-Reply-To: <002801bfcec7$fcd69bc0$07fbc23f@pacbell.net>
On Mon, 5 Jun 2000, Don Golding wrote:
> I agree wholheartedly that 18 stack levels are more than sufficient for good
> Forth programming. I have been programming in Forth for over 10 years and I
> never have used more than four Items on the stack. 98% of the time there
> are no more than three Items with one or two more typical for most
> applications. Keeping stack operations to a minimum is the best way to use
> Forth. If you have three or more items on the stack you need to factor the
> definition more. Anyone who thinks they need alot of stack space needs to
> read "Thinking Forth" again...
I think you're forgetting calls. One word may never have more than 4 items on
the stack, but what about the word that called it? I think I can usually keep
it to less than 6, but I'll have to be constantly paying attention "I'm using
3 levels on the stack, and this word I'm calling, it's only using 2, right?"
Whereas with 18 levels, I would not even have to think about that very often.
There may be a preference for code that uses few levels of nesting, but that
is not my immediate preference.