home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / misc / 3711 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.2 KB

  1. Path: sparky!uunet!psinntp!dg-rtp!sheol!throopw
  2. From: throopw@sheol.UUCP (Wayne Throop)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: languages which allow the introduction of new operators
  5. Summary: confusing the abstract with the concrete
  6. Message-ID: <721718060@sheol.UUCP>
  7. Date: 14 Nov 92 02:21:03 GMT
  8. References: <721458276@sheol.UUCP> <veit.721491920@du9ds3> <KERS.92Nov12085629@cdollin.hpl.hp.com> <BxMCxA.3nM@mentor.cc.purdue.edu>
  9. Lines: 35
  10.  
  11. :: From: kers@hplb.hpl.hp.com (Chris Dollin) writes:
  12. :: Message-ID: <KERS.92Nov12085629@cdollin.hpl.hp.com>
  13. :: [...]  define 5 ++( x, y ); lvars x, y; x + y + 1 enddefine; [...]
  14. : From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  15. : Message-ID: <BxMCxA.3nM@mentor.cc.purdue.edu>
  16. : [...] I would accept that as the insertion of the ++ operator.
  17.  
  18. :: (Pop is an open-stack language), ``x * y'' means ``push x, push y,
  19. :: call -'', and ``f(x)'' means ``push x, call f''.
  20. : But I would object to any language which insists that we use a
  21. : strictly stack machine.  Pushing, popping, and calling are to be
  22. : avoided unless necessary.  Otherwise things just run too slowly to be
  23. : of more than theoretical use.
  24.  
  25. This is yet another case of confusing the abstract notation with a
  26. concrete implementation.  Just because the abstract semantics has the
  27. model of a stack is NO reason to suppose that this forces one to
  28. implement the model using an explicit stack with explicit push and pop
  29. operations.  (Not being intimately familiar with Pop, it may be that
  30. Pop *does* require an explicit stack in the implementation, but that
  31. can't be told just from what Chris said.  Certainly he explicitly said
  32. that the "call" operation may be open-coded in such a way as to
  33. involve no actual call operation at runtime, as a property of the
  34. operation, thus:)
  35.  
  36. :: *Some* procedure calls are coded in-line, but this is not a property of
  37. :: being (syntactically) operators; it is a property of being a particular
  38. :: procedure, such as fast_front, or fi_+.
  39.  
  40.  
  41. ( BTW, note the difference between a stack explicit in the notation, vs
  42.   one explicit in the implementation.  This is the opposite of the case
  43.   of pointers vs references previously discussed. )
  44. --
  45. Wayne Throop  ...!mcnc!dg-rtp!sheol!throopw
  46.