Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Standard systems vs. standard programs Message-ID: <9007201343.AA14784@ucbvax.Berkeley.EDU> Date: 20 Jul 90 06:52:40 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 60 JW> I'd like an explanation from those of you who think that you can JW> take one of your current programs and will be able to run them JW> without change on anybody's ANSI system. The ANS standard does not intend this, nor do I believe that it would be possible to develop a standard, any standard, for which this would be possible (because the present variations among extant systems is reflected in the contents of current programs). The portability goals of the ANS standard, as I understand them, are: a) It should be possible to write a new program that will run without change on anybody's ANSI system. b) It should be possible to run your old programs on the same vendors' systems that they used to run on, with little or no modification, even after those vendors' systems have been modified to conform to the ANS standard. c) Where (b) is violated (i.e. where changes to old programs are required), those changes should be as mindless as possible. Definition of "mindless" by example: 1) Redefining a word at the start of an application is mindless. 2) Globally substituting all occurrences of a word with another word or phrase is mindless. 3) Subtle changes, such tricky semantic differences in the way that VOCABULARY works or the way in which : affects the search order, are not mindless. (That is why VOCABULARY was renamed to WORDLIST ; the differences between its implementation among extant systems are too tricky). In other words, the ANS standard will not magically make your old programs portable. Old programs will be pretty much as portable or as nonportable as they currently are (perhaps after a round of "mindless" changes). Another way of saying this is: If an old program currently runs on LMI Forth and F83 and F-PC, but not on MMS Forth or MacForth, it will probably still run on LMI ANS Forth and ANS F83 and ANS F-PC, but probably not on MMI ANS Forth or ANS MacForth. And, it will be easier to write a new program to run on all of the ANS Forths systems than to write a new program to run of all of the current nonANS Forths. The reasons it will be easier to write a new portable program: a) Precisely-defined alternatives to current "problem words" (e.g. NOT , / , VOCABULARY) have been created. b) 32-bit systems are now allowed. c) Rules for portable usage of addresses and address alignment have been articulated. d) Wordsets for often-needed but previously-unspecified functions (e.g. floating point, file access, dynamic memory allocation, error handling, run-time search order, strings) have been added. Mitch