Sujet : Re: Parsing timestamps?
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 25. Jun 2025, 04:27:33
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <d82938e7a98984ff66ded29fed23e5594c228aea@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 24/06/2025 7:30 pm, Hans Bezemer wrote:
...
You'll also find it in my C work. There are a lot more "small functions" than in your average C program. It works for me like an "inner API". Not to mention uBasic/4tH - There are plenty of "one-liners" in my uBasic/4tH programs.
But that train of thought needs to be maintained - and it can only be maintained by submitting to the very philosophy Forth was built upon. I feel like if I would give in to locals, I'd be back to being an average C programmer.
Forth forces an average programmer to adopt a level of organisation sooner than a locals-
based language. I suspect forthers that promote locals are well aware forth is readable
and maintainable but are pursuing personal agendas of style which requires implying the
opposite. Why do I think so? Because even when they use locals they still try to be
Forth-ish and keep definitions short. They know it's impossible to sell long definitions
to a Forth programmer.
I've seen Forth applications written by the proverbial C programmer. Curiously no locals
were used - perhaps because the programmer was seriously attempting to try out Forth.
It may have been on the bucket list as he doesn't appear to have pursued it. What gave it
away was the length of definitions which averaged 20 lines. There were occasional whoppers,
60 and 200 lines. Even though code had been carefully indented to be readable, it would
likely horrify the average Forth programmer. In short, it lacked Forth sensibility. And
I think it's the latter that we're talking about in all these discussions.
...
Nine times out of ten one doesn't need the amount of locals which are applied. One doesn't need a 16 line word - at least not when you actually want to maintain the darn thing. One could tackle the problem much more elegant.
It's that feeling..
Agreed