The Future??? of Forth (Musings of a Forth fanatic) Hardware is leaving Forth behind * Only toy machines have a 16 bit address space; 1 MByte of memory costs $200. 32 bit stacks are "nonstandard" * 20 Mbyte hard disks cost about $500. That's 20000 blocks. Now, let's see, is that load screen on block 5796, or is it 7834? Software is leaving Forth behind * Computers come with an operating system that uses files and has an editor, utilities, etc. You can't use those tools with Forth, because they can't cope with Forth screens. * Forth doesn't have any standard library routines to speak of. Sure, it's easy to write your own, so everybody does so. Most aren't very good. If you give away your code, you have to include all your libraries too (then you have to document them!). * Forth is very good at naming program fragments, and relatively poor at naming data (no local variables, for instance). Most other languages are the other way around. Why Do People Dislike Forth? * Forth implies that the compiler course you took was a waste of time? * The languages you learned in school are stupid? * The editor is crummy! * Many of the restrictions are pointless! (16 bits, no files, no standard string handling, existing use of strings is poorly extensible) * It is really different; getting accustomed to a new language is painful enough; with Forth you need a new set of programming strategies, not just a new syntax. What is good about Forth * It is interactive !!!!!!! It gives you control of the machine * It is ALMOST consistent (breakdowns: strings are prefix, not postfix) * It is extensible; you can build your own language when it is appropriate * It is compact, and very severe subsetting is possible without sacrificing the interactiveness Random thoughts * Forth words the take string arguments should be able to take their strings from the stack. * State smartness is okay; having two words ' and ['] which nominally do the same thing is very annoying, and hard to explain to people. Rule: If it's hard to explain, it's broken. Some Nice Things about Sun Forth * Terminal independence (something like this should be in the standard!) * Command Line Editor with command completion * Stack-size independent * Portable File system interface * Does not even HAVE blocks * Access to Unix system calls * Can use C language routines. * Exception handling * Very portable to many 68000 systems. * Well-factored text interpreter * Simple window system * Load path for libraries * Runs either under Unix or stand-alone