home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / forth / 3719 < prev    next >
Encoding:
Internet Message Format  |  1993-01-01  |  2.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!drycas.club.cc.cmu.edu!pitt.edu!pitt!willett!dwp
  2. Newsgroups: comp.lang.forth
  3. Subject: Re: Experimental Ideas (STOIC?)
  4. Message-ID: <4200.UUL1.3#5129@willett.pgh.pa.us>
  5. From: dwp@willett.pgh.pa.us (Doug Philips)
  6. Date: 1 Jan 93 03:07:21 GMT
  7. Organization: EIEI-U
  8. Lines: 45
  9.  
  10. In article <4179.UUL1.3#5129@willett.pgh.pa.us>,
  11.     MARCEL HENDRIX writes:
  12.  
  13. [I'm quoting more than I otherwise would, because it has taken me so long
  14.  to reply.  -Doug]
  15.  
  16. + dw> It is even worse than that.  What if the user uses CREATE DOES>
  17. + dw> in the nameless colon definition?  Better not forget that code!
  18.  
  19. + Ok, in practice this will mean you can do more than the
  20. + interpreter allows, but still not everything. I'd say the code is
  21. + temporary by definition, so what you want with DOES> is clearly
  22. + illegal (in that it can't work :)
  23.  
  24. + dw> If that code also does ALLOT or HERE manipulation, what does
  25. + dw> "forgetting" it mean?
  26.  
  27. + The final result must be the same as typing  5 ALLOT  or  CREATE
  28. + foo 3 , that is, the change is ``permanent''. It has to be.  Of
  29. + course the compiled (temporary) code cannot reside at HERE , if
  30. + that is what you meant. That would interfere with about anything.
  31.  
  32. Right, so that even though it almost acts as if you did:
  33.     : tmp ... ; tmp forget tmp
  34. it can't be _that_ easy since HERE and ALLOT would be ineffective.  You
  35. then have to allocate the space for the temporary word somewhere else.  Ah,
  36. but then don't you need to modify : or maybe ] to make them compile
  37. somewhere other than HERE ?  ...  and you need (perhaps?) some way of
  38. dealing with immediate words, that is, in postponing them?
  39.  
  40. + To do it well, a string stack (not known and not a number  foo :
  41. + 1+ ; ) or changed syntax ( S" foo" : 1+ ; ) is needed.  As people
  42. + have mentioned already, it then starts to resemble STOIC (don't
  43. + know it, but looks interesting). The version with the S" may be
  44. + possible with little internal change and very little side
  45. + effects, but it sure gives a different look to the source code.
  46.  
  47. Yeah, it starts getting messy.  I'm not at all convinced that blurring the
  48. line, when it cannot be entirely erased, won't lead to more confusion,
  49. rather than less.  However, this issue may be no less contentious than
  50. the state-smart versus stateless word issue.  ;-)
  51.  
  52. -Doug
  53. ---
  54. Preferred:  dwp@willett.pgh.pa.us    Ok:  {pitt,sei}!willett!dwp
  55.