On Wednesday, September 17, 2003, at 08:28 AM, Rob Cozens wrote:
I see two uses for referenced parameters, and one involves optimization (or execution speed).
From my perspective, the speed difference only comes into play when the arguments are large. For example, the record buffer in SDB is ALWAYS passed by reference.
OK, thanks. I didn't think of testing large parameters. For small parameters the speed difference is not noticeable.
The other reason for passing by reference is that in some designs it just makes sense to have the handler update the original variable directly instead of returning a value that then replaces the original.
A so called "destructive function". Harder to debug, harder to test. But I've done it too. :-)
Alex Rice <[EMAIL PROTECTED]> | Mindlube Software | http://mindlube.com
what a waste of thumbs that are opposable to make machines that are disposable -Ani DiFranco
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
