Yeah, I'm in for removing need of using
[@ index]
, as generally when passing some array to script, in 99% cases we either want to modify it, or only read, not make a exact copy on first write
As for compatibility issues, would be nice, that when opening project in >= 2.3.X version, if it was created in version <= 2.3.(X-1), a compatibility note would be generated, with list of ALL scripts, in which there's argument which in function body looks like array and is written, like.:
GML:
function something(foo, bar) {
foo[2] = 14;
return foo[2] + bar;
}
As we can see, while from defintion we don't know if
foo
or
bar
are arrays, from function body we know, that it might be, and that copy-on-write behavior happens here. While it's hard to tell if programmer wanted it or not (for example if foo was a "var" array, it's destroyed at end of event so somebody could even not notice copy-on-write behavior), creating a compatibility note with info that
foo in function something() needs your attention because copy-on-write was removed on arrays, so it will modify original argument from now on
would be a big help to find all scripts and variable names that need our attention and decision.