Sujet : Re: Avoid treating the stack as an array [Re: "Back & Forth" is back!]
De : minforth (at) *nospam* gmx.net (minforth)
Groupes : comp.lang.forthDate : 09. Sep 2024, 22:16:49
Autres entêtes
Organisation : novaBBS
Message-ID : <ca50fd408802f216f88efa431ca90b90@www.novabbs.com>
References : 1 2 3 4 5 6 7
User-Agent : Rocksolid Light
On Mon, 9 Sep 2024 15:15:32 +0000, Hans Bezemer wrote:
I won't dispute that using the "locals" shortcut *may* save some
programming time - but to me, the moment you decide to put the whole
shebang in locals, you enter another mindset. Because at that moment you
cease to consider the algorithm itself, but start banging out code.
>
You no longer consider "do I need that, do I need that now, do I need
that here", you just start creating more local variables. Somehow that
kills my train of mind..
The thing is that your train of mind is focused on optimising the
parameter flow via the stack. you are doing stupid work that an
intelligent compiler does automatically today. it makes much more sense
to focus your brainware on the algorithms or automation tasks to be
solved.
Since such algorithms/tasks are mostly formulated mathematically or
logically, an almost 1:1 translation of such formulations by using
locals
is straightforward and less error prone. Use descriptive names and the
code
becomes quasi commented simultaneously.