Article View: comp.robotics.misc
Article #123Re: Forth compiler?
From: Jeff Fox
Date: Sun, 30 Apr 2000 00:00
Date: Sun, 30 Apr 2000 00:00
106 lines
5422 bytes
5422 bytes
We have advice here from a couple of people who dropped out of using Forth twenty years ago. Their opinions are based on comparing twenty year old Forths (the last they remember) to the C that they use today. To be fair one should compare today's commerical Forths to today's commercial C or today's public domain Forths to today's C. Harry H Conover wrote: > > Paul Victor Birke (nonlinear@home.com) wrote: > : Dear Jeff > : > : Was there every a higher level language like BASIC that could be > : compiled into FORTH code? > > Learn C Language programming, it's much more intuitive to program in > than was FORTH, C is more mainstream. What is intuitive to you will depend on your background and how it is presented to you. > and with today's optimized compilers produces much more > efficient code than does FORTH. Today's optimizing Forth compilers are compeditive with today's optimizing C compilers. However many people base their opinions on what they saw twenty years ago without realizing that native code optimization has been in widespread use in Forth for at least a decade. > : In other works you could write in non forth terminology yet get the > : speed and compactness. > > You can get the same benefits using C, only better. Except of course where we are talking about an environment or application that includes the compiler. A C compiler can never compete with Forth in that way. > FORTH pushed and > poped everything onto and from the stack, which in its day was kind of > novel but today, largely due to it's total lack of type checking, its > inability to be useful in anything but minimal code implementations, > and the horror of trying to maintain and expand an application written > in FORTH, FORTH is now an anachronism. Fortunately, today only a > few legacy FORTH applications are in common use, and those mostly in > Radio Astronomy. Wow, many myths strung together. Yes, Forth is based on a stack. The stack can be optimized by hardware and software mostly into registers. Forth is not a typed language but this has never been a problem for the many NASA space missions or industrial applications running Forth. Where Forth has been used professional there are no unusual problems with maintenance or expansion. There are in fact some very impressive stories. However I can well imagine the horror that a C programmer who doesn't know Forth might feel at being told that he was going to have to be a Forth maintenance programmer instead of working in C. ;-) Today Forth is still in widespread use in places like NASA, SUN, IBM, Motorola, ... Forth is widely used in embedded programming, robotics, and real time programming. However much of the press it gets comes from people who played with it a little twenty years ago and continue to tell people what they know about Forth. > With today's compilers, anything you could do in FORTH you can do in > C better, and much safer. This is simply not true. Today's optimizing Forth compilers do about the same as today's optimizing C compilers do. There are also some versions of Forth that are smaller and simpler than any C compiler. > : I left Forth in the early 1980s when I got my first > Ohio Scientific PC > : in 1979 with Interpretive BASIC from Bill Gates BTW! > > Most of us abandoned FORTH when we obtained our first C > compiler. Since > that time I know of no one who has ever returned to FORTH. > > Harry C. You dropped out from Forth near the beginning. Things have changed a lot in Forth, just like in C in the last twenty years. There are many people who have used both C and Forth together and still do. They can be mixed in different ways. All SUN machines boot in Forth before going into the C and Unix environment. They have been doing this for a long time because it makes a lot of sense. If you don't believe me ask the people who write the Forth compilers used at SUN and Moto. Many more projects are done in Forth than most people realize, but most people have only heard about 20 year old Forths. There are many impressive stories about Forth and C battling over some big historic commercial projects. Jeff Fox
Technical Details
Message-ID:
<390D0C7E.FD6E5FB2@UltraTechnology.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<46WN4.7560$3f2.56017@typhoon2.kc.rr.com> <8ei8n2$4t6@news-central.tiac.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd6dd,cea8eaac6fd65daa X-Google-Attributes: gidfd6dd,public X-Google-Thread: 10d04f,6bfdd9870af454ef X-Google-Attributes: gid10d04f,public X-Google-Thread: feec1,6bfdd9870af454ef X-Google-Attributes: gidfeec1,public X-Google-Thread: 1045ed,6bfdd9870af454ef X-Google-Attributes: gid1045ed,public X-Google-Thread: 107cee,6bfdd9870af454ef X-Google-Attributes: gid107cee,public From: Jeff Fox <Fox@UltraTechnology.com> Subject: Re: Forth compiler? Date: 2000/04/30 Message-ID: <390D0C7E.FD6E5FB2@UltraTechnology.com> X-Deja-AN: 617905653 Content-Transfer-Encoding: 7bit References: <46WN4.7560$3f2.56017@typhoon2.kc.rr.com> <8ei8n2$4t6@news-central.tiac.net> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@value.net X-Trace: news.value.net 957156644 11110 209.182.168.45 (1 May 2000 04:50:44 GMT) Organization: UltraTechnology Mime-Version: 1.0 NNTP-Posting-Date: 1 May 2000 04:50:44 GMT Newsgroups: comp.robotics.misc,comp.ai.neural-nets,sci.electronics.misc,sci.med.vision,bionet.neuroscience