Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!sunbelt!eaker From: eaker@sunbelt.crd.ge.com (Charles E Eaker) Newsgroups: comp.lang.forth Subject: Re: Merits of Forth Message-ID: <17792@crdgw1.crd.ge.com> Date: 21 Mar 91 22:55:51 GMT References: <1991Mar21.192611.28487@src.honeywell.com> Sender: news@crdgw1.crd.ge.com Distribution: na Organization: General Electric Corporate R&D Center Lines: 33 In article <1991Mar21.192611.28487@src.honeywell.com> lowry@src.honeywell.com (Dave Lowry) writes: >With all this discussion of the merits of Forth, I wonder if somebody >could comment on the usefulness of a language that merrily accepts >things like: > >: 1 2 ; > >resulting in: > >1 1 + . 4 ok You need the language to tell you that : 1 2 ; is a stupid definition? or to prevent you from stringing together lexemes into structures that represent semantic nonsense? Every language allows any manner of semantic blathering. Try teaching a first programming course in Pascal or C. Few languages can protect programmers from nonsense. But very few even allow you to express the kind of nonsense found in : 1 2 ; The alternative is to introduce restrictions on what characters can appear in a word's name and where they may appear in the name. If : 1 2 ; is ruled out, so is : 1 1 ; Many of us would argue that the cure is clearly worse than the disease. (Although the disease can be close to fatal when FEED is accepted by the interpreter when the base is hex, and the word named FEED is not, contrary to your expectations, in the search order.) The fact that Forth accepts kinds of nonsense that can't be expressed in most other languages says nothing about Forth's usefulness. It is merely a side-effect of Forth's lack of restrictions on names. -- Chuck Eaker / P.O. Box 8, K-1 3C12 / Schenectady, NY 12301 USA eaker@crd.ge.com eaker@crdgw1.UUCP (518) 387-5964