home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / edu / 1574 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.8 KB

  1. Xref: sparky comp.edu:1574 comp.lang.fortran:3473 comp.lang.misc:2970 comp.arch:9282 sci.math:11122
  2. Path: sparky!uunet!spool.mu.edu!agate!overload.lbl.gov!lll-winken!lll-crg.llnl.gov!blair
  3. From: blair@lll-crg.llnl.gov (Gary Blair)
  4. Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math
  5. Subject: Re: Re: Scientists as Programmers (was Re: Small Language Wanted)
  6. Message-ID: <135691@lll-winken.LLNL.GOV>
  7. Date: 8 Sep 92 16:08:19 GMT
  8. References: <1992Sep3.112944.20996@dbsun.uucp> <Bu08uF.HBC@mentor.cc.purdue <KERS.92Sep4154056@cdollin.hpl.hp.com>
  9. Sender: usenet@lll-winken.LLNL.GOV
  10. Followup-To: comp.edu
  11. Distribution: na
  12. Organization: Lawrence Livermore National Laboratory
  13. Lines: 24
  14. Nntp-Posting-Host: lll-crg.llnl.gov
  15.  
  16. In article <KERS.92Sep4154056@cdollin.hpl.hp.com> kers@hplb.hpl.hp.com (Chris Dollin) writes:
  17. >In article ... fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
  18. >
  19. >   C++ allows you to overload existing operators, although to make compiler
  20. >   writer's jobs easier, it does not allow you to introduce new operators.
  21. >
  22. >Make that ``trivially easier''. So far as I am able to tell, the difficulty of
  23. >allowing the user to add new operator definitions is rather close to zero, so
  24. >long as this is taken into account *before* designing the language and
  25. >compiler. (C++ has the problem of trying to incorporate the lexical structure
  26. >of C.)
  27. >
  28.  
  29.  
  30. Wrong.  If your compiler uses ANY kind of table-driven parsing scheme, it is
  31. next to impossible to allow programmer-defined operators.  The parser must
  32. know what an operator looks like, and what precedence it has  with respect
  33. to all other operators.  This is usually predetermined, at
  34. compiler-generation time.  
  35. -- 
  36.      Gary J. Blair   (510) 422-6675        blair@dancer.llnl.gov
  37.      Lawrence Livermore National Laboratory        
  38.      P.O. Box 808, L-156
  39.      Livermore, CA 94550                  
  40.