On 6/8/05 6:54 AM +0900, Joel Rees wrote on [OT] Re: FORTH >> I was just wondering what the magic was that you saw in FORTH. My >> understanding is that it is a very low level language.
Gee. I must have missed this one! One upon a time, I worked with Forth quite a bit, even developing a few implementations of my own. The one thing that's always struck me about Forth is that it is much less a "language" than it is a technique for programming. To me, that's always been a part of its "magic". >Think of FORTH as LISP without parenthesis underneath everything, Using Forth in what I'd call a "surface" level, the above might be reasonable but the "magic" starts when you get beneath the hood. Fortunately, this is not all that difficult in most Forth systems. >FORTH needed a lot of work, and the current standard misses a lot of >points, leaves you stuck with a reverse polish C and not-quite-unix >libraries, and still no standard object format. Statements like this are among the main reasons why more people don't use Forth. They get scared off by the lack of all the dross computer languages carry with them. I don't know what "points" the current standard misses (FWIW: I rather objected to its creation in the first place - people doing Forth work seldom pay it much mind anyway). I personally love being "stuck with reverse Polish" - postfix notation actually makes operational sense, unlike infix notation. But the truth is that if you must write arithmetic expressions in infix notation, it is not a big problem to add the ability to Forth. As for Forth libraries, there a lots of them - they're called source code. Forth compiles almost as fast as its source can be read from a hard disk on a well written implementation, anyway. There's very little reason to have an "standard object format" in Forth as one does not link modules to build programs as a rule (such things can be and have been done but are hardly worth the bother). >Java tries to do what FORTH could have done ... I assume this is about transportable code. Actually Forth did this a VERY long time ago. It's just that hardly anyone bothered to notice. For example, I once wrote a version of Forth, dubbed Wump4TH, for the Apple ][. It used what is known as token-code, something I did not invent, so it precedes my use. Shortly after Mitch Bradley and I spent the night talking about how this was implemented, he invented Open Firmware. The idea behind OF is that a computer need only have the basic token interpreter in its ROM to handle dealing with cards developed independently of the computer's CPU. Things like OF might be a bit more well known if it weren't for the plethora of PC BIOS vendors who aren't interested in that sort of standardization - it'd put them out of business by obviating what they do now. >Whether FORTH could have answered the problems that you run into when >you start trying to implement true context sensitive grammars... According to Alan Turing and Chuck Moore, if you can't do it in Forth, you can't do it. ;-) -- Walter M. Pawley <[EMAIL PROTECTED]> Wump Research & Company 676 River Bend Road, Roseburg, OR 97470 541-672-8975