Sean Corfield wrote:
On 5/31/05, Mark Mandel <[EMAIL PROTECTED]> wrote:

Okay - now maybe this is a stupid question but:

Why do arrays get passed by value, whereas structs get passed by reference?


Because that's how CF has always done it... I bet it was originally an
accident in JJ's C++ implementation but then code began to rely on it
and the behavior has to be preserved. Anyone got a really old copy of
CF that supports both arrays and structs to see what the assignment
behavior was?

After a quick dash to our museum and digging out our really, really old copies I remember that Structures came in with CF4. Before that everything was passed by value. I suspect (and remeber rumours at the time) that structures-by-value were just too hard so from that point we had the mixture of both pass-by-value and pass-by-reference. Similarly we had the oddity of the StructCopy function being half and half, now that was a bit wierd.....


HTH,


Kym K


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to