home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 4000 < prev    next >
Encoding:
Text File  |  1993-01-26  |  2.5 KB  |  55 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!venezia!penev
  3. From: penev@venezia (Penio Penev)
  4. Subject: Re: Recent FORTHs' guts  (was: Documenting)
  5. References: <1993Jan25.180225.9582@exu.ericsson.se>
  6. Sender: nobody@ctr.columbia.edu
  7. Organization: Rockefeller University
  8. Date: Tue, 26 Jan 1993 06:20:19 GMT
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Message-ID: <1993Jan26.062019.13295@sol.ctr.columbia.edu>
  11. Reply-To: penev@venezia.rockefeller.edu
  12. X-Posted-From: venezia.rockefeller.edu
  13. NNTP-Posting-Host: sol.ctr.columbia.edu
  14. Lines: 39
  15.  
  16. James Hague (exuhag@exu.ericsson.se) wrote:
  17. : Penio Penev writes:
  18. : >Another consideration is when You run RISC processors (I'm running
  19. : >R3000 currently). There You have even more space and You can benefit
  20. : >_a lot_ from the inlining of some primitives.
  21. : I have mixed feelings about making a true compiler an integral part 
  22. : of Forth.  It would remove the simplicity and understandability of
  23. : the traditional Forth system--a step toward the 'black boxes' of
  24. : conventional language IMO.  But a native code generator which could
  25. : be run after development was complete would be a godsend and there
  26. : seem to be surprisingly few of these.  Tom Almy's ForthCMP, which I
  27. : am a registered user of, is nice but does force you to give up some
  28. : of the power of Forth in exchange for native code (you have to keep
  29. : ForthCMP in mind while you are writing an application).
  30.  
  31. I feel a bit confused what You mean by 'true compiler'. I suppose You
  32. mean something You pass a text stream to and it returns some kind of
  33. assembly or object. 
  34.  
  35. What I ment is something completely different. I ment native coding,
  36. inlining and local (I think the term is peephole) optimisation. The
  37. interpreter and compiler stay the same (I mean the definitions of
  38. INTERPRET and ] ). When You write code You cannot tell the diference.
  39. The only point is that You have more IMMEDIATE words, which check
  40. whether some optimisation can be performed and put the binary code
  41. into the dictionary. These are words like LITERAL @ ! DUP DROP SWAP
  42. and others. You cannot decompile, but You never need this, since You
  43. have the source and LOCATE (or VIEW on some FORTHs).
  44.  
  45. : More and more I'm discovering one of the reasons for Forth's lack
  46. : of popularity is that, while it doesn't have to be used solely for 
  47. : embedded systems, there isn't much support outside of that area.
  48.  
  49. I guess this statment will be flamed by the FORTH vendors, who are
  50. suppose to 'support [products] outside of that area'.
  51.  
  52. -- Penio.
  53.