Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!ihnp4!houxm!hropus!jin From: jin@hropus.UUCP (Jerry Natowitz) Newsgroups: comp.lang.forth Subject: Re: TIL design topics Message-ID: <783@hropus.UUCP> Date: Sun, 16-Nov-86 16:16:36 EST Article-I.D.: hropus.783 Posted: Sun Nov 16 16:16:36 1986 Date-Received: Mon, 17-Nov-86 01:59:57 EST References: <1001@usl.UUCP> Organization: Bell Labs, Holmdel, NJ Lines: 28 Keywords: Roll Your Own Language > Reversing the links: In most FORTH systems, the "compiler" or > "interpreter" (threader?) starts searching for words starting at the > last word defines, and runs down the link till reaching the bottom or > finding the word. The most-used words, like "@" and "!", though, are > defined close to the bottom of the text stack. So why not start at > the bottom, and go upwards? In Superforth-64, it sometimes takes 10 > seconds to compile a block after reading it in from disk (which is > tediously slow in itself, with the notorious 1541 drive). Probably due > to the fact that it has some 250-300 words in its vocabulary. > > But, what side effects will that have? Surely, there is SOME reason > that FORTH systems usually have the links going the wrong way! One very good reason: FORTH's extensibility permits you to redefine a word but continue to use it's old definition in code previously compiled. People will probably argue about the correctness of using this feature (I've used it and been burned by it, my vlist command stars redefined words to warn of the condition) but it is there for the using. BTW: I don't program in FORTH anymore, writing a DBS in it was the most excrusiating experience of my professional career. -- Jerry Natowitz (HASA - J division) Bell Labs - HR 2A-214 201-615-5178 (no CORNET yet) ihnp4!houxm!hropus!jin (official) ihnp4!opus!jin (better)