Article View: comp.lang.misc
Article #2391Re: Pointers
From: John Haxby
Date: Fri, 13 Nov 1992 10:28
Date: Fri, 13 Nov 1992 10:28
32 lines
1865 bytes
1865 bytes
In article <1992Nov12.141532.16375@jyu.fi>, sakkinen@jyu.fi (Markku Sakkinen) writes: |> Don't be fooled by words. Maybe the CLU literature does not much use |> the word 'reference' (I don't remember), but I cannot see any semantic |> difference between CLU variables (of non-atomic types) and reference |> (or pointer) variables in many other languages. 'By sharing' is |> exactly the same as 'by reference'. In CLU, x in p1 = proc (x: int) ... end p1 and p2 = proc (x: string) ... end p2 is passed by sharing. In the VAX implementation, the p1 has its argument passed by value, the second by reference (in the grubby depths). In the PCLU implementation, both procedure calls pass a CLUREF structure (by value) which contains the value of an integer or a pointer to string data. `By sharing' allows the implementation of the compiler to choose the mechanism for passing the parameter to a procedure, the only requirement is that changing the contents of a mutable argument is reflected in all instances of the argument. Don't mix implementation strategies with language semantics. -- John Haxby, Definitively Wrong. Digital <jch@rdg.dec.com> Reading, England <...!uknet!wessex!jch> ---------------------------------------------------------------- The opinions expressed herein are my own, not my employers.
Technical Details
Message-ID:
<1992Nov13.102813.9215@rdg.dec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!sdd.hp.com!decwrl!pa.dec.com!rdg.dec.com!jchReferences:
<1992Nov11.155149.14744@rdg.dec.com> <1992Nov12.081454.23507@jyu.fi> <1992Nov12.103513.14043@rdg.dec.com> <1992Nov12.141532.16375@jyu.fi>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!sdd.hp.com!decwrl!pa.dec.com!rdg.dec.com!jch From: jch@rdg.dec.com (John Haxby) Subject: Re: Pointers Message-ID: <1992Nov13.102813.9215@rdg.dec.com> Sender: news@rdg.dec.com (Mr News) Organization: Digital Equipment Corporation References: <1992Nov11.155149.14744@rdg.dec.com> <1992Nov12.081454.23507@jyu.fi> <1992Nov12.103513.14043@rdg.dec.com> <1992Nov12.141532.16375@jyu.fi> Date: Fri, 13 Nov 1992 10:28:13 GMT Lines: 32