[A92] Re: Forth


[Prev][Next][Index][Thread]

[A92] Re: Forth



Aaron Fineman wrote:
> whats FORTH? is that another language?

Yes, Forth is a programming language that is especially well suited to 
small systems. Though I don't have any experience in it yet, I've talked 
about it at great length with my housemate, who uses it extensively for 
embedded systems. Forth is a low level language not far removed from 
assembly. In fact, there is usually an assembler that's part of the 
Forth environment, seemlessly integrated with the rest of the system.

However, Forth also has constructs to facilitate programming in a 
structured, high level fashion. Some people even write object systems 
and GUI's in Forth. Even better, you can extend the syntax in the 
language itself to define new control structures and abstract data types.

Forth is a very niche language, with a small and sometimes cloistered 
community. It is very strange to most programmers, so it doesn't tend to 
attract a lot of users. The syntax is very different from most 
languages, as it's extremely free form and postfix (RPN). Almost 
everything in Forth involves stack operations instead of operations on 
variables. Although I can't yet speak from experience, my housemate said 
it took him several years to really get into Forth just because it 
requires such a different way of thinking from most languages. However, 
he said that it has made him a better programmer in general, even in 
languages like C because Forth forces one to factor mercilessly.

Forth provides an interactive interpreter which allows one to enter 
code, defining words (Forth equivalent of functions) and testing them 
interactively. Some Forths also have optimizing compilers that produce 
native code.

The Forth Interest Group (http://www.forth.org/) is a good source of 
information.

Jonathan Rogers




References: