🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2126

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

#2126
From: USENET News System
Date: Thu, 19 Nov 1992 20:29
32 lines
1995 bytes
In article <1992Nov19.104407.338@jyu.fi>, sakkinen@jyu.fi (Markku Sakkinen) writes:
> 
> In article <1992Nov17.155855.4413@let.rug.nl> bert@let.rug.nl (Bert Bos) writes:
> >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

Wait until I put on my asbestos suit...

OK

The _only_ correct way of parameter passing is for all
parameters to be constant throughout the execution
of the procedure, they are evaluated when the procedure
is called. It is sometimes convenient to use value
parameters, but it is better to declare a local variable
so the parameter doesn't even _appear_ to be modified.

If you want to return values, use a function procedure.
This implies that a decent laguage must return structured
type. Structure displays would also be useful so that we
can assign results directly to a list of variables.
(E.g. (x, y) := F(u, v, w);)

For example, we might want a string APPEND procedure.
Instead of the traditional
APPEND(S1, S2);
which changes S2 to S2 with S1 appended, you would write
S2 := APPEND(S1, S2);
A good compiler should be able to implement this as though
var parameters were used, but implementation details are
irrelevant for the high level language user.
Technical Details
Message-ID: <1992Nov19.202945.17635@massey.ac.nz>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!waikato.ac.nz!comp.vuw.ac.nz!cc-server4.massey.ac.nz!TMoore@massey.ac.nz
References: <1992Nov13.130852.22775@jyu.fi> <1992Nov16.080647.26783@informatik.uni-ulm.de> <1992Nov17.155855.4413@let.rug.nl> <1992Nov19.104407.338@jyu.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!waikato.ac.nz!comp.vuw.ac.nz!cc-server4.massey.ac.nz!TMoore@massey.ac.nz
Newsgroups: comp.lang.modula2
Subject: Re: Oberon vs Modula-2 (Re: mail delivery error)
Message-ID: <1992Nov19.202945.17635@massey.ac.nz>
From: news@massey.ac.nz (USENET News System)
Date: Thu, 19 Nov 92 20:29:45 GMT
References: <1992Nov13.130852.22775@jyu.fi> 
 <1992Nov16.080647.26783@informatik.uni-ulm.de> <1992Nov17.155855.4413@let.rug.nl> <1992Nov19.104407.338@jyu.fi>
Organization: Massey University
Lines: 33