home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.forth
- Path: sparky!uunet!decwrl!csus.edu!netcom.com!xtifr
- From: xtifr@netcom.com (Chris Waters)
- Subject: Re: ANS TC Magnet for ROMability
- Message-ID: <95+n5g+.xtifr@netcom.com>
- Date: Sat, 22 Aug 92 22:08:35 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <4000.UUL1.3#5129@willett.pgh.pa.us>
- Lines: 74
-
- In <4000.UUL1.3#5129@willett.pgh.pa.us> ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) writes:
-
- >Category 10, Topic 22
- >Message 76 Fri Aug 21, 1992
- >B.RODRIGUEZ2 [Brad] at 22:45 EDT
-
- Brad asks about the possibility that a cross-compiler could be an ANSI
- standard system (as opposed to merely being a standard program). The
- answer, as I see it is: no way!!
-
- It might be a good idea *at some point* to come up with a way to define
- "standard cross-compilable programs", but Forth is, and always has been,
- an interpretive language. Cross-compilers remove the interactive nature
- (specifically, the ability to execute newly created definitions).
-
- There's one exception to my "no way" comment above: if the
- cross-compiler can, somehow, execute a newly created definition out of
- the target system. This is far beyond the capabilities of most cross
- compilers I have seen, but I suppose it might be possible in some cases.
-
- >QUESTIONS: Please answer the following:
-
- [I've only answered a subset of these]
-
- > 6. To what extent must newly-defined Forth words, comprising a
- > Standard Program, be executable interpretively in a Standard
- > System?
-
- 100%
-
- > 7. Which of the following are valid Standard Programs?
-
- > a) 4 5 + .
-
- > b) : TEST 4 5 + . ;
-
- > c) : TEST 4 5 + . ; TEST
-
- > d) 4 CONSTANT FOUR FOUR 5 + .
-
- > e) : SQR DUP * ; 4 SQR CONSTANT FOO
-
- > f) : SQCON DUP * CONSTANT ; 4 SQCON FOO
-
- All of them.
-
- Cases e) and f) show the reason for this. Removing this ability would
- virtually eliminate Forth's ability to create complex data structures,
- as well as breaking huge amounts of existing code.
-
- > 10. What penalties are imposed upon vendors who wrongfully label
- > cross-compilers "ANSI Standard"?
-
- Judging from what I've seen of other languages, none. Except, perhaps,
- public censure. :-)
-
- Writing cross-compilable code almost always entails using various
- extensions to specify whether words exist in the host or target system.
- At some point, it would probably be a good idea to codify and
- standardize some of these extensions, and perhaps modify the standard to
- allow a normal standard system to recognise (and perhaps ignore) these
- extensions. Until then, standard programs can not necessarily be
- cross-compiled, and standard systems may not be able to handle
- cross-compilable code.
-
- At the moment, I think that this is an issue best left alone. Brad
- seems to be proposing something that would virtually gut the standard,
- unless the issues I mention in the previous paragraph are dealt with.
-
- Disclaimer: my opinions only, I'm not a member of, or associated with,
- the ANS TC, or any company that has representitives on the TC.
- --
- Chris Waters | the insane don't | NOBODY for President!
- xtifr@netcom.COM| need disclaimers | Because Nobody's perfect!!
-