On 1/8/07, Steven E. Harris <[EMAIL PROTECTED]> wrote:
The whole idea of a "program" in Lisp doesn't really make sense, unless one wanders into implementation-specific "boot functions", but even then those are just singled-out entry points into the big ball of mud. -- Steven E. Harris
Forth is pretty much the same. You don't so much have a bunch of programs as a bunch of functions since it really is a functional language. These functions are finer grained then programs but may also be at a much higher level i.e. one might have a function. Solve_Differential_Equation that took a few parameters off a stack and produced a few thousand items on the stack. This function is really no different semantically or syntactically than a low level function that might just add two items on the stack and then place a single item back onto the stack. In Forth this extends all the way to the control structures> The IF is just a function that puts some data on the stack for evaluation by a branching function. The result is awesome flexibility which when tied to rapid interactivity leads to all of the things for which Forth is both famous and infamous. One of my favorite syntactical constructs was the IF MAYBE THEN which is really simple to implement in Forth. The ability to create such things leads to new ways of expressing some problems which can on occasion lead to new solutions. The downside is that it leads also to many a cul de sac that drives the typical manager (and most programmers to tell the truth) wild. Sure is fun though, BobLQ BTW, I hear this "programming in anger" phrase from time to time. The phrase strikes me as juvenile. Me, I believe in programing for fun if I am going to be juvenile. Life is too short to be angry. One needs far more serious reasons than programming to be angry. Forth has always been more fun than damn near any other environment I ever worked in. -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
