🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2110

Re: Oberon vs Modula-2

#2110
From: mwki.fht-mannheim.de Marc Wachow...
Date: Mon, 16 Nov 1992 18:35
18 lines
1610 bytes
Andreas Borchert (borchert@titania.mathematik.uni-ulm.de) wrote
in reply to Markku Sakkinen <sakkinen@jyu.fi>:
: Agreed, programmers shouldn't be enforced to use VAR-parameters
: for reasons of efficiency only. But, even with the semantics of
: Oberon or Modula-2, it's not to difficult for the compiler to
: detect that your 1000 x 1000 array isn't modified and, thus,
: doesn't need to be copied.

That doesn't work as soon as your procedure is public and (directly or
indirectly) calls some procedure not fully known to the compiler, since
the original argument may be accessible and modified behind the back of the
supposedly innocent routine. According to the current definition it only
sees a copy made at the entry and therefore would not be influenced by the
perfectly legal modification, but due to our smart optimizer ... :-(

-------------------------------------------------------------------------------
 Marc Wachowitz, mw@ki.fht-mannheim.de   /  news zombie - reply by e-mail, too
  *  wonder everyday    *    nothing in particular    *    all is special  *
Technical Details
Message-ID: <gpjqq!h+@aix01.rz.fht-mannheim.de>
Path: arc1-ca.pugleaf.net!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
References: <1992Nov16.080647.26783@informatik.uni-ulm.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!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
From: mw%ki.fht-mannheim.de (Marc Wachowitz)
Subject: Re: Oberon vs Modula-2
Message-ID: <gpjqq!h+@aix01.rz.fht-mannheim.de>
Date: Mon, 16 Nov 92 18:35:02 GMT
Organization: Fachhochschule fuer Technik Mannheim
References: <1992Nov16.080647.26783@informatik.uni-ulm.de>
X-Newsreader: TIN [version 1.1 PL6]
Lines: 18