From oliver at first.in-berlin.de  Tue Mar  6 10:06:21 2012
From: oliver at first.in-berlin.de (oliver)
Date: Tue, 6 Mar 2012 10:06:21 +0100
Subject: [Rd] Julia
In-Reply-To: <4F555B46.3080007@gmail.com>
References: <CAO7JsnRykFo22Jc+pTGsZhg9EvFE=zxE3XpVvSnzc-=mp=AfKw@mail.gmail.com>
	<20120303011413.GA18995@siouxsie>
	<E66794E69CFDE04D9A70842786030B93282DF1@PA-MBX04.na.tibco.com>
	<20120305170835.GA4134@siouxsie> <4F555343.8020007@fhcrc.org>
	<4F555B46.3080007@gmail.com>
Message-ID: <20120306090621.GB1849@siouxsie>

On Mon, Mar 05, 2012 at 07:33:10PM -0500, Duncan Murdoch wrote:
> On 12-03-05 6:58 PM, Herv? Pag?s wrote:
> >Hi Oliver,
> >
> >On 03/05/2012 09:08 AM, oliver wrote:
> >>On Mon, Mar 05, 2012 at 03:53:28PM +0000, William Dunlap wrote:
> >>>I haven't used Julia yet, but from my quick reading
> >>>of the docs it looks like arguments to functions are
> >>>passed by reference and not by value, so functions
> >>>can change their arguments.  My recollection from when
> >>>I first started using S (in the course of a job helping
> >>>profs and grad students do statistical programming, c. 1983)
> >>>is that not having to worry about in-place algorithms changing
> >>>your data gave S a big advantage over Fortran or C.
> >>[...]
> >>
> >>
> >>C also uses Call-by-Value.
> >
> >C *only* uses Call-by-Value.
> 
> While literally true, the fact that you can't send an array by
> value, and must send the value of a pointer to it, kind of supports
> Bill's point:  in C, you mostly end up sending arrays by reference.
[...]

It's a problem of how the term "reference" is used.
If you want to limit the possible confsion, better say:
giving the pointer-by-value.

Or: giving the address-value of the array/struct/...
by value.

To say, you give the array reference is a shorthand,
which maybe creates confusion.

Just avoiding the word "reference" here would make it more clear.
AFAIK in C++ references are different to pointers. (Some others
who know C++ in detail might explain this in detail.)

So, using the same terms for many different concepts can create
a mess in understanding.


Ciao,
   Oliver



[Rd] Julia
oliver