!ARMForth32 on the Raspberry Pi

 
 
Home Page
 
 What is Forth?
 
 Why use Forth?
 
 !ARMForth32
 
Code Extensions
 
Examples
 
Downloads
 
More Information
 
 

Why use Forth?

  A brief list of the advantages of using Forth are:

  1. the code produced is fast - usually about 50% of the speed of hand-crafted assembler and at least 10x faster than Basic
  2. a Forth macroassembler can be used for time-critical code (see examples in 'Downloads' section)
  3. compact  memory requirements - no bloatware here!
  4. unrestricted low-level access to hardware/peripherals, so ideal for the Raspberry PI
  5. Great flexibility to extend the language - new data types easily defined (eg complex numbers, vectors, records, lists , N-dimensional arrays etc) - using CREATE aand DOES> , described as "the jewel of Forth"
  6. uses a LIFO data stack to pass variables, so that fewer defined variables and constants are needed (equivalent to LOCAL variables)
  7. Code is written as a list of existing words in plain text and are compiled (added) into an existing dictionary of other words at run time
  8. multi-tasking ability similar to RiscOS (i.e. co-operative system), but distinct from it and easy to use. Other multi-tasking systems may also be used, depending on the application. 
  9. Forth provides an interactive programming environment (with both interpretive and compiled features) and is designed for those people who wish to write their own programs.

Some of the possible disadvantages are:

  1. "Write-only" code. It can be difficult for  others to understand a program if there is inadequate commenting or poor layout. This would apply to any programming language, however.
  2. 'Postfix' notation takes time to appreciate (no brackets required!)