On 28/06/2018 11:30, Stephen Pelc wrote:
> On Wed, 27 Jun 2018 21:29:09 +0100, Gareth's Downstairs Computer
> wrote:
>
>> IMHO where Forth falls down it is because it is a write-only
>> language; programs other than the limited training exercises
>> being difficult to fathom out.
>
> This is a traditional calumny.
No it is not. It is true. Forth is a favourite of badly or self
taught programmers because on the surface it seems very easy to get
started, and, although aficionados of FORTH will understand and
remember everything that they themselves have coded, the same is not
true for the unfortunate individuals who have to maintain the code;
maintenance being where most of the cost of software lies. This is
because FORTH is more an assembly language than a high level language.
Indeed, the instruction set of the English Electric KDF9 is remarkably
similar, and its publication may well have been the inspiration
for Charles Moore, the instigator of FORTH.
> Bad programmers write bad code.
True in all languages, and FORTH is a field where self taught
programmers feature largely as bad ones.
> A problem with Forth is that you need to be quite a good programmer
> to use it well.
It is unclear from that comment whether or not you disagree with me.
>
> Writing readable code is something that has to be learned.
But it cannot be learned in FORTH; FORTH being in Reverse
Polish Notation.
An example, take the general snippet of A + B, or, A+B, which
in FORTH becomes A B +, and NEVER AB+ because spaces are very
important in FORTH to separate the verbs.
In a HLL, were you to code A + + B (deliberately spaced
to circumvent indignant C programmers :-) ) it
would get thrown out as a syntax error, but in
FORTH were you to code A B + +, it would compile OK, but
you wouldn't find your error until your program crashes.
Hence, more an assembly language than a HLL.
> I speak
> as someone involved in the maintenance and development of a
> Forth application of 1,400,000 lines of source code.
I bet you're the only person who knows their way around that cod.e
>> Taking an analogy with the building trades, it is very easy to
>> understand the simple operation of laying bricks, but were you to
>> attempt building a hospital by laying a few bricks without sight
>> of the complete project, you'd very soon end up with little more
>> than a pile of bricks.
>
> That's engineering. It applies to all programming languages.
FORTH is great for hacking, for perhaps implementing the on-boot
monitor for new processors without other support, but the very nature
of FORTH indicates that it is not engineering, for, were you to be
involved in the many weeks, months even, of designing a large
software project, you would not be writing it in FORTH, even
assuming you could assemble a team of FORTH experts.
> The idea that you only need one or two languages for daily use
> is relatively recent.
Straw Man / Non sequitur.
> When I started programming for a living
> we used several a year because the salesmen kept giving compilers
> away in order to sell hardware.
Rapid flitting between languages over the course of a year suggests
lightweight applications.
> Programming is a discipline and a
> craft. It needs practice.
A truism, but by asserting that you seem to suggest that the practice
needed for FORTH is so much greater than for other languages and
environments.
Just my Ha'pporth, IMHO YMMV
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|