Re: Pass by Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message
jaygade said...

To be clear, Euphoria DOES pass by reference but it copies on write. So there is a performance advantage there.

As for manipulating large data structs, in Euphoria you currently have to implement them as file-level or global variables for efficiency.

One thought that I've had for implementing a new language is that functions should be pass by reference/copy on write, but procedures should be pass by reference/modify in place.

Question:

For every write (eg, x[i] = n) does the internal routine check to see if "x" has a refcount [and if it has make a fresh copy] before setting the data?

Spock

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu