Ever the metaphorical thinker, this reminds me of good gun safety
practices (aka ways NOT to shoot yourself in the foot) - it's all in
knowing how to control a powerful tool.
Phil Davis
(meant in a lighthearted way and limited strictly to the parallel
observed - not intended to engender discussion/debate about guns)
Mark Smith wrote:
I think the point is that when a variable is passed to a function/
handler 'normally', the data in it is duplicated, and if the data is
big, this is not as efficient as passing it by reference - obviously,
if you need to change the data in the called function/handler, this may
have unwanted side-effects, in which case passing it normally is going
to be better.
Mark
On 21 Mar 2006, at 02:20, Sarah Reichelt wrote:
On 3/21/06, Rob Cozens <[EMAIL PROTECTED]> wrote:
G'day Sarah,
In my experience, it's probably due to never passing values by
reference.
I'm curious as to why you eschew passing by reference.
If one needs to pass large variables, why incur the overhead of
duplicating the value of the variable before passing it? And if a
variable value needed at one level is derived from a routine nested
several calls deep, simply passing the variable by reference through
the nested calls is the simplest way to get the value back to the
original caller.
It's not a philosophy, more ignorance :-)
I haven't ever really tested it and I have an instinctive feeling that
functions should be self-sufficient and shouldn't change anything
outside them. Maybe it will suit me better in some circumstances.
Cheers,
Sarah
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution