Jonathan Hutchins wrote: > On Tuesday 09 December 2003 11:08 am, Charles Steinkuehler wrote: > >> Jared wrote: >> > Why Forth? Does FORTH produce tighter executables? > > Clearly, a compiled program is going to be tighter than a shell script. But > if compact is what you're after, what about assembler? Actually, a compiled program (or even assembler) isn't necessarily as small (or 'tight') as a well-done interpreter and some scripts, and the interpreter is a lot more general solution. The trick is to make an application lanugage that is well-suited for the task at hand. The individual commands are typically stored as tokens (to take up less space), and program size can be very small. Of course, there's always the overhead of the actual interpreter, but for simple languages like forth, that overhead can be as small as a few K of actual assembly (or C or whatever) that's running the 'core' of the language. The big benifit of "native" (compiled or assembler) programs over an interpreted language is typically run-time speed, not size (assuming the interpreter isn't excessively large, ie: ash instead of bash :-). -- Charles Steinkuehler charles@steinkuehler.net