Sujet : Re: Parsing timestamps?
De : minforth (at) *nospam* gmx.net (minforth)
Groupes : comp.lang.forthDate : 01. Jul 2025, 20:36:21
Autres entêtes
Organisation : novaBBS
Message-ID : <6dcd99ffba129d06b1f736994363eb87@www.novabbs.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Rocksolid Light
On Tue, 1 Jul 2025 18:40:38 +0000, Paul Rubin wrote:
In a traditional Forth with locals, the locals are stack allocated so
accessing them usually costs a memory reference. The programmer gets
the same convenience as a C programmer. The runtime takes a slowdown
compared to code from a register-allocating compiler, but such a
slowdown is already present in a threaded interpreter, so it's fine.
In all this strange discussion about the ôpure and trueö Forth
philosophy (on which even Charles Moore once went his own way), the
human cost of programming time never comes up.
Nobody seems to care about that time. Instead, the focus seems to be
primarily on code runtime, even though the difference is only
microseconds or less.
This is completely nonsensical for 99% of all cases. Some people seem
to prefer ôon principleö to help the computer with human work through
ôpremature optimizationö to get its stack elements in the right order,
and to factorize the programming task into digestible chunks, whether
it is natural for the task or not. In a professional environment, this
stubborn attitude is completely uneconomical.
In my world, using locals in appropriate cases gets me done much faster,
error-free, and the code is self-documenting. This time gain is
astronomical when you put it in relation to microseconds of runtime
difference.
--