Forth a write-only language?

57 views
Skip to first unread message

The Beez

unread,
Jun 9, 2021, 4:43:42 AM6/9/21
to 4tH-compiler
Hi 4tH-ers!

I may do a Wiki page on that later in time, but I thought it was a good idea to tackle this subject now. Because that reputation ("Forth is a write-only language") has haunted the language for years. And still..

The point is, every language is susceptible to BAD programming habits. But since Forth is an amplifier of just about everything, BAD practices make you reach that point a lot quicker when working with Forth.

E.g. PP4tH is a complex piece of software. But is has been maintained and enhanced for over a decade now. We even plugged in FTRAN lately (and that wasn't a walk in the park, since both pieces of software were independently developed and have their own architectures).

Programs like "editor" and "venture" have been with 4tH since their first release - and are still going strong. So it's simply not true - and we shouldn't be saying that ourselves.

So what triggered this rant? I thought this morning that MAX() and MIN() would be nice additions to uBasic, so in order to check I did a "diff". And this was the result for adding TWO new functions (which worked first time, BTW):

148,149d147
<     enum 'MAX'                         \ MAX()
<     enum 'MIN'                         \ MIN()
184,185d181
<   ," max"      'MAX' ,
<   ," min"      'MIN' ,
575,576d570
< : (max)   exp,exp max ;                ( -- n)
< : (min)   exp,exp min ;                ( -- n)
667,668d660
<   ' (max) ,                            \ return the largest value
<   ' (min) ,                            \ return the smallest value
user@user-System-Product-Name:~/home/habe/4th.dev/ubasic$ 

Understand what I'm saying?

Hans Bezemer
Reply all
Reply to author
Forward
0 new messages