Re: Forth Frustrations
- From: "rickman" <gnuarm@xxxxxxxxx>
- Date: 3 Apr 2007 14:30:13 -0700
On Apr 2, 1:52 pm, "J Thomas" <jethom...@xxxxxxxxx> wrote:
On Apr 2, 1:37 pm, Andreas Kochenburger <a...@xxxxxxxxxx> wrote:
Factoring is one thing. But some algorithms or formulae do not allow it.
If it can work to use an algorithm that does allow factoring, that
algorithm will usually be easier to write and debug, and it might be
simpler and also more efficient. But sometimes that isn't possible.
And sometimes there isn't time to spare to find out whether it's
possible or not.
I don't buy into the idea that an algorithm can't be factored. If it
can't be factored, then it must be so small that it is not needed.
The only time I could not factor a function to make it simpler to code
in Forth was when it had for loops with relatively little code inside
the loop other than stack juggling. Moving the inner code to another
function did not make anything more clear and actually would make it
worse since all references to the loop variable more difficult. If
there was much code inside the loop then it could easily be worth the
effort of making another function.
.
- Follow-Ups:
- Re: Forth Frustrations
- From: J Thomas
- Re: Forth Frustrations
- From: Charlie Springer
- Re: Forth Frustrations
- From: John Passaniti
- Re: Forth Frustrations
- References:
- Forth Frustrations
- From: George Peter Staplin
- Re: Forth Frustrations
- From: Andreas Kochenburger
- Re: Forth Frustrations
- From: John Doty
- Re: Forth Frustrations
- From: Andreas Kochenburger
- Re: Forth Frustrations
- From: J Thomas
- Forth Frustrations
- Prev by Date: ARMD: Emacs-based embedded language with compile-time register stack
- Next by Date: Re: ARMD: Emacs-based embedded language with compile-time register stack
- Previous by thread: Re: Forth Frustrations
- Next by thread: Re: Forth Frustrations
- Index(es):
Relevant Pages
|