HALDANE@UFPINE.BITNET ("that _special_ Haldane magic...") (04/14/89)
I have just recently joined this news group, and I am not familiar with the debate on blocks vs. text files as storage, so I will refrain from comments there. I do have another question: Is there an inplementation of a FORTH superset or similar TIL that has object-orientation and operator overloading? The proliferation of addition operators only serves to confuse some programmers (_I_ can deal with it, but some of my freinds can't). In theory, a new language, FIFTH, could be the result, sortof like making a true C++ compiler rather than simply a pre-preprocessor. I see a bit of value to having just a + operator instead of +, D+, M+, Q+, $+, etc. (if I missed one, let me know). Thanks in advance, Bob Slaughter BITNET: Haldane@UFPine InterNet: Haldane@Pine.circa.ufl.edu
ZMLEB@SCFVM.BITNET (Lee Brotzman) (04/14/89)
>I do have another question: Is there an inplementation of a FORTH superset >or similar TIL that has object-orientation and operator overloading? The >proliferation of addition operators only serves to confuse some programmers >(_I_ can deal with it, but some of my freinds can't). In theory, a new >language, FIFTH, could be the result, sortof like making a true C++ compiler >rather than simply a pre-preprocessor. I see a bit of value to having just > >Thanks in advance, > Bob Slaughter >BITNET: Haldane@UFPine >InterNet: Haldane@Pine.circa.ufl.edu Since you're new to comp.lang.forth I'll assume you have heard nothing of Fraser Orr's comments on our language which follow these lines. I can send you log files if you wish. About FIFTH, the name has already been taken, and has been for a while. Below, I reproduce some recent messages from the East Coast Forth Board which give an overview of the FIFTH langauge. Enjoy. -- Lee Brotzman (FIGI-L Moderator) -- BITNET: ZMLEB@SCFVM SPAN: CHAMP::BROTZMAN -- Internet: zmleb@scfvm.gsfc.nasa.gov GEnie: L.BROTZMAN -- The government and my company don't know what I'm saying. -- Let's keep it that way. -- Isn't Cold Fusion how Eskimos are made? Date: 04-06-89 (05:35) Number: 1289 (Echo) To: ALL Refer#: NONE From: DAN MILLER Read: (N/A) Subj: FIFTH DISCUSSION AND SUPP Status: PUBLIC MESSAGE Fifth is being offered as shareware, and is subject to the usual licensing procedures for such software. This means that you are free to evaluate Fifth and to make Fifth available to others, but you can not sell it or at the stroke of midnight you will turn into Bill the Cat (tm?). If you find Fifth useful, sends us 20 Beautiful American Dollars. $10 more gets you a 100+ page typeset manual. (Out of USA - $15) Another $10 puts you on our mailing list. We mail out programming tips, bug lists, and user comments every two months. Feel Free to Call US! Sorry no collect calls though... CLICK Software (409) 696-5432 P.O. Box 10162 College Station, Texas. 77840 P.S. Fifth is being designed for the modern programmer. What do YOU want to see in a programming environment? Please send suggestions, ideas, etc to the above address. ---< Fifth in a nutshell >--- Fifth is an interactive program development environment. It supports FORTH as a base language. Multitasking and Software Virtual Memory (Source, object and data items larger than memory) on a 68000 based version is in the works. Fifth includes two interesting commands: HELP and DIR. The HELP command provides on-line documentation for the calling parameters to the primitives in the system. HELP requires you to have a file called FIFTH.HLP accessable. (The path searched is specified by HELPFILE under HELP.) A program, BLD.FIV, is provided so that users may extend the FIFTH.HLP file as they wish. The DIR command invokes a menu-driven dictionary editor. Using the arrow keys, the dictionary (which is a tree-like structure) may be traversed and modified. Shift-left & right arrow will rearrange words on the same level, page-up and down will move words from level to level. Play with it until it becomes familiar, it is the most often used feature of the system. From the DIR command source files may be loaded and saved, compilations forced, etc. Fifth supports a concept of compile-by-demand, if an attempt to execute an uncompiled word is made, the word is compiled before execution. Exiting the editor will also compile the word being edited, thus in most cases the programmer does not have to specify a compile stage. The compiler is roughly 5 times faster than Turbo 3.0, and in most cases only the text being edited needs compiling, so the compile stage is usually invisible. Fifth uses MSDOS files instead of screens & blocks. Fifth uses 32 bit arithmetic, real numbers, automatic 8087 support, direct instead of threaded code, access to all of memory and a more interesting scoping scheme than FORTH's straight up global scoping. To load and execute TOWERS.FIV, execute FIFTHIBM (or FIFTHTI) from DOS. At the FIFTHIBM> prompt type DIR<return>. Type 'L' (for Load), then the file name - TOWERS.FIV<return>. The TOWERS.FIV program will load. At the FIFTHIBM> prompt type 5 HANOI<return>. The number of disks in the tower may be altered from 1 to 12. Press any key (except space) to stop the program. Use the DIR command to inspect the program. The WINDOW.FIV program needs to be run under EMULATE on the TI PC. TI users will need to change the MACHINE flag in the FRAC.FIV program to fully utilize the TI graphics resolution. * Origin: GEnie and the Forth Interest Group Date: 04-10-89 (21:50) Number: 1301 (Echo) To: ALL Refer#: NONE From: DAN MILLER Read: (N/A) Subj: FIFTH DISCUSSION AND SUPP Status: PUBLIC MESSAGE The address listed in the Fifth readme.doc file is no longer a working address. Send fifth requests, registrations and professional upgrade requests to 2746 Longmire, College Station, TX 77840. * Origin: GEnie and the Forth Interest Group
mikpa@massormetrix.ida.liu.se (Mikael Patel) (04/14/89)
Its quite easy to simulate operator overloading in Forth using vocabularies. In my C based Forth 83 implementation, XFORTH, I have added a facility in the Forth top-loop so that overloading and casting ala C are possible. For instance, in a vocabulary with string function one may have a function plus, "+", for string concatination (not $+ as often advocated). If the vocabulary is in the search order and found first there's no real problem. To hard bind to the plus operator from this vocabulary in other cases when, for instance, forth preceeds the string vocabulary in the search order, I allow a "casting" operation: "(string) +" The implementation is very simple (as everything in Forth). In the top loop, normally interpret, if "find" fails I examine the token it see if it could be a casting operation, i.e., some word in parenpheses. In this case I remove the parenpheses and call "find" again. If it returns with a vocabulary entry I just scan the next symbol and repeat the procedure until it either fails, or an entry is found (which is not a vocabulary). So, "(float) +", would mean plus from float. Now all of this talk is early binding. If you want to do late binding ala Smalltalk the problem is somewhat different. Maybe we can discuss late binding in Forth in this news group because there alot of way of introducing it. So let's continue this discussion on late binding!! May the Forth be with you... Mikael R.K. Patel Researcher and Lecturer Computer Aided Design Laboratory Department of Computer and Information Science Linkoping University S-581 83 LINKOPING SWEDEN Phone: +46 13281821 Telex: 8155076 LIUIDA S Telefax: +46 13142231 Internet: mip@ida.liu.se UUCP: ...!enea!liuida!mip Bitnet: MIP@SELIUIDA SUNET: LIUIDA::MIP