lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"John Hind" <john.hind@zen.co.uk> writes:

> I agree that Forth is very efficient and I believe its philosophy has
> heavily influenced the design of virtual machines and "byte-code"
> intermediate systems. However the cost of this efficiency is to make
> the programmer think like a (very simplistic) computer while the
> purpose of a programming language is surely to produce computer code
> from an input language suited to human beings? I have done a lot of
> programming in assembly language particularly for microcontrollers and
> to be frank, I would choose assembly over Forth any day of the week
> and assembly has no runtime overhead at all!

Under the premise that the capacity of the human mind is unlimited.
Which is not realistic with regard to programming.  High level languages
allow to employ your wits better focused, more strategically.  Forth is
not much more than glue and boxes for assembly.

> I was also very impressed at first by the elegance, efficiency and
> minimalism of Forth, but quickly fell out of love when I actually had
> to do something non-trivial with it. I suspect its enthusiasts have
> never tried to deliver anything requiring more than a page of code or
> anything requiring long-term maintenance.

Cross-compiled and bootstrapped a complete industrial spring measurement
station with logs, printing, menu system, keyboard interface, device
controllers.  It fit into something like 8kB after throwing out the
basic+system interpreter of the Z80 system.

> Lua makes a good teaching language because it uses the same conceptual
> framework as the vast majority of other "mainstream" languages out
> there while being minimalist, regular and flexible. Forth is certainly
> very minimalist, but its very difference makes it a poor choice as a
> grounding for training working programmers.

Forth is the only system where I'd feel comfortable making a student
assignment to bootstrap a complete system.

Pretty much everything else has components "above student level" or
taking longer than a term to come to terms with.

In the "that's all one need?" department, it is pretty unique, and that
accounts for something.  Not necessarily everything, but something that
you can get nowhere else is a justification for mindshare.

-- 
David Kastrup