home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1403 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.5 KB  |  30 lines

  1. Newsgroups: comp.lang.modula2
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!haven.umd.edu!darwin.sura.net!jvnc.net!gmd.de!ira.uka.de!rz.uni-karlsruhe.de!uni-heidelberg!fht-mannheim!mw
  3. From: mw%ki.fht-mannheim.de (Marc Wachowitz)
  4. Subject: Re: Oberon vs Modula-2
  5. Message-ID: <gpjqq!h+@aix01.rz.fht-mannheim.de>
  6. Date: Mon, 16 Nov 92 18:35:02 GMT
  7. Organization: Fachhochschule fuer Technik Mannheim
  8. References: <1992Nov16.080647.26783@informatik.uni-ulm.de>
  9. X-Newsreader: TIN [version 1.1 PL6]
  10. Lines: 18
  11.  
  12. Andreas Borchert (borchert@titania.mathematik.uni-ulm.de) wrote
  13. in reply to Markku Sakkinen <sakkinen@jyu.fi>:
  14. : Agreed, programmers shouldn't be enforced to use VAR-parameters
  15. : for reasons of efficiency only. But, even with the semantics of
  16. : Oberon or Modula-2, it's not to difficult for the compiler to
  17. : detect that your 1000 x 1000 array isn't modified and, thus,
  18. : doesn't need to be copied.
  19.  
  20. That doesn't work as soon as your procedure is public and (directly or
  21. indirectly) calls some procedure not fully known to the compiler, since
  22. the original argument may be accessible and modified behind the back of the
  23. supposedly innocent routine. According to the current definition it only
  24. sees a copy made at the entry and therefore would not be influenced by the
  25. perfectly legal modification, but due to our smart optimizer ... :-(
  26.  
  27. -------------------------------------------------------------------------------
  28.  Marc Wachowitz, mw@ki.fht-mannheim.de   /  news zombie - reply by e-mail, too
  29.   *  wonder everyday    *    nothing in particular    *    all is special  *
  30.