Sujet : Re: Fortran was NOT higher level than C. Was: Computer architects leaving Intel...
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.archDate : 08. Sep 2024, 10:33:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240908123330.000079a1@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Thu, 5 Sep 2024 14:37:56 -0000 (UTC)
Thomas Koenig <
tkoenig@netcologne.de> wrote:
Michael S <already5chosen@yahoo.com> schrieb:
In other group (Matlab/Octave) pass-by-value is the only available
option, so I use it all the time, but it does not mean much.
I knew there's a reason for me not using matlab or octave :-)
But of course, if it's your day job, you have little choice
in the matter.
Since in Matlab/Octave function can return as many arrays/matrices as
one wants (by value, of course) and since memory management is
automatic, it's all ends up sufficiently convenient. And certainly
easier to follow for reader and less error prone to writer than most
forms of passing arrays by reference.
The only serious downside of this approach is a performance hit due to
sometimes unnecessary copying and allocation/freeing. More often than
not it's not a big deal and certainly not a main performance bottleneck
of this environments.