Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!calgary!cpsc!gintera From: gintera@cpsc.ucalgary.ca (Andrew Ginter) Newsgroups: comp.lang.forth Subject: Re: Thoughts on Forth (was: Why don't people use Forth...) Summary: function nesting Message-ID: <2342@cs-spool.calgary.UUCP> Date: 15 Jan 90 18:19:08 GMT References: <6001@sdcc6.ucsd.edu> <756@noe.UUCP> <95.UUL1.3#5129@willett.UUCP> <240.UUL1.3#5129@willett.UUCP> Sender: news@calgary.UUCP Lines: 35 It seems to me I've argued this argument before, but last time it was about LISP and its derivatives. Now granted, people use LISP and FORTH for almost completely different kinds of applications and LISP is incredibly much slower than FORTH. What is similar about the languages, though, is their expressive power. Language lovers of both species claim that software is easier and quicker to develop in their favorite language than in mainstream languages. Actually, seems that language lovers of ALL species claim this... Anyhow - my point is that extensibility and regular syntax are nice, yes. But the key to the claim that you need to write less code in these languages is the degree of function nesting. Extremely compact applications in both LISP and FORTH (and maybe APL? - I'm not that familiar with the language) employ high degrees of function nesting. The results of functions are passed directly as arguments to other functions whose results are passed to other functions, etc. MOST programmers will grant that deep nesting produces compact code and that such code is comparatively easy to write. They will also argue that deeply nested code is difficult to read and understand - a criticism commonly leveled against LISP and FORTH. SOME programmers (FORTH lovers included) have no difficulty with function nesting and don't understand why the rest of the world doesn't like the obvious advantagers of FORTH: * clean syntax * super extensibility * compact, easy to write code * good speed & small size (which FORTH has and LISP usually doesn't) The fact is that MOST people have trouble with nesting and no matter how you tout a language which encourages nesting, they will never like it. Andrew Ginter, 403-282-2984, gintera@CPSC.UCALGARY.CA, Ginter@UNCAMULT.BITNET