Sujet : Re: Parsing timestamps?
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 30. Jun 2025, 21:43:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87bjq5yn8i.fsf@nightsong.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
dxf <
dxforth@gmail.com> writes:
The stack ops THEMSELVES may be, in a way, "canonical" — but not
solving "each and every" programming task using them
"no-matter-what", IMHO.
>
But such would indicate a deficiency in Forth. Do C programmers reach a
point at which they can't go forward?
Assembly language programmers reach a point where they run out of
machine registers and have to do clumsy things to swap stuff between
registers and memory. C compilers automate that process. Every C
compiler with register allocation has to deal with register spilling.
The programmer doesn't have to deal with it, but it's similar clumsy
assembly code coming out of the compiler.
In Forth without using locals, "register allocation" (deciding what is
in each stack slot) is manual and there are fewer "registers" to begin
with (basically TOS, NOS, TOR, and the 3rd stack element that you can
reach with ROT). Modern CPUs by comparison generally have 16 or more
addressible registers. The PDP-11 and 8086 had 8 registers and
programmers found that to be painful.