Message from discussion FORTH Trouble--Please Show Me
Received: by 10.180.105.41 with SMTP id gj9mr3822323wib.3.1350786426513;
Sat, 20 Oct 2012 19:27:06 -0700 (PDT)
NNTP-Posting-Date: Sat, 20 Oct 2012 21:27:05 -0500
Date: Sat, 20 Oct 2012 16:27:04 -1000
From: "Elizabeth D. Rather" <erat...@forth.com>
Organization: FORTH, Inc.
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
Subject: Re: FORTH Trouble--Please Show Me
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 10/20/12 3:52 PM, Paul Rubin wrote:
> "Rod Pemberton" <do_not_h...@notemailnotz.cnm> writes:
>> Without data structures, a language is just a bunch of do-nothing
>> loops and if's. You basically said you should learn Forth without learning
>> a critical component of it!
> Especially in the embedded regime, a heck of a lot of real-world
> programs don't have any complex algorithms or data structures. There's
> just some variables and maybe a few arrays, plus the stacks for
> intermediate values and control, plus a bunch of special case tests and
> i/o for the application at hand. Even numerical computation (numerical
> linear algebra or signal processing, say), which does use fancy
> algorithms, tends to still not use advanced data structures beyond the
> aforesaid variables and arrays.
This is true, but Forth's ability to define application-specific data
types is still valuable in embedded systems. Examples I've seen include
named "objects" that are actually data ports (or even selected bits on a
data port) with implicit reads or writes when accessed; circular buffers
for high-speed data acquisition, and a circular list of polynomial
coefficients that returns the next one when referenced.
The ability to define custom data types easily is one of Forth's most
powerful (and unique) features. But it's also something that's easy for
beginners to learn, and I think it would be a massive disservice to
advise someone to forgo learning it!
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
"Forth-based products and Services for real-time
applications since 1973."