< Previous | Contents | Next >
Just like when you pass a value, when you return a value from a function, you’re really returning a copy of the value. Again, for values of the basic built-in types, this isn’t a big deal. However, it can be an expensive operation if you’re returning a large object. Returning a reference is an efficient alternative.