On Sat, May 13, 2017, at 08:35, Tim Bradshaw wrote:
Are there languages that copy arrays in function calls
defaultly?
Perhaps Fortran has some convention that allows that but I doubt it gets
used very much, because it would be insane in most cases:
COMPUTE_MEAN_TEMPERATURE(ATMOS) is really *not* going to work very well
if it involves copying the ATMOS array.
Fortran, for the record, passes nearly everything by reference - to call
a fortran function from C (or to make a C function callable from
fortran) you've got to mangle the name and change almost everything to
pointers.