🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2113

Re: Oberon vs Modula-2 (Re: mail delivery error)

#2113
From: Bert Bos
Date: Tue, 17 Nov 1992 15:58
13 lines
1437 bytes
In article <1992Nov16.080647.26783@informatik.uni-ulm.de>, borchert@titania.mathematik.uni-ulm.de (Andreas Borchert) writes:
> 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.
> 
> Usually, the calling procedure passes a reference to the array onto
> the stack in both cases and the called procedure then makes a copy
> of the array if you have call-by-value and your array parameter
> is subject to changes.

But what about a PROCEDURE p(a: Type; VAR b: Type) that is called as p(x, x). Both parameters will refer to x, but if b is modified, a should remain unchanged.
Technical Details
Message-ID: <1992Nov17.155855.4413@let.rug.nl>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!freya.let.rug.nl!bert
References: <5897@balrog.ctron.com> <1992Nov11.102409.12183@jyu.fi> <1992Nov13.100154.6167@informatik.uni-ulm.de> <1992Nov13.130852.22775@jyu.fi> <1992Nov16.080647.26783@informatik.uni-ulm.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.modula2
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!freya.let.rug.nl!bert
From: bert@let.rug.nl (Bert Bos)
Subject: Re: Oberon vs Modula-2 (Re: mail delivery error)
Message-ID: <1992Nov17.155855.4413@let.rug.nl>
Sender: news@let.rug.nl (news manager)
Nntp-Posting-Host: tyr.let.rug.nl
Organization: Faculteit der Letteren, Rijksuniversiteit Groningen, NL
References: <5897@balrog.ctron.com> <1992Nov11.102409.12183@jyu.fi> <1992Nov13.100154.6167@informatik.uni-ulm.de> <1992Nov13.130852.22775@jyu.fi> <1992Nov16.080647.26783@informatik.uni-ulm.de>
Date: Tue, 17 Nov 1992 15:58:55 GMT
Lines: 14