Re: Pass by Reference
- Posted by Critic Sep 13, 2009
- 2176 views
jemima said...
Critic said...
In practice, "foo" often is something more complex like "universe[x][y][z][t]":
universe[x][y][z][t] = func(universe[x][y][z][t])
Now you have to visually compare the left and right expressions and see if they are the same.
func(byref universe[x][y][z][t])
With this syntax it's clear something is modified too.
Unfortunately it might be clear when you are reading the function, but not when you are reading the call to the function.
func(byref universe[x][y][z][t])
is the call to the function.
But much Eu code is full of the usage of global variables, so the whole argument "but I want to see immediately if something is modified" is a moot point anyway.