Am 22.06.2015 um 19:18 schrieb Riccardo (Jack) Lucchetti:
On Mon, 22 Jun 2015, Sven Schreiber wrote:
> 1) Allin (&Jack): make the non-assigned call special, which protects the
> dataset in place. Downside: no way to get the returned list in a 100%
> riskless way; inconsistent etc etc.
I don't think I understand what you mean. If you want the returned list
in a 100% riskless way, all you have to do is assign it to a temporary
variable. What happens is entirely predictable (and hence, I would say,
safe).
<hansl>
function list moo(void)
series y = -1
list ret = y
return ret
end function
...
# with this, your original y is safe
moo()
Safe yes, but of course at the cost of not getting any benefit at all (=
the return value) from the function. I call this throwing the baby out
with the bathwater. How on earth can this non-retrieval of the return
value be considered a solution to the overwriting problem below, if the
solution defeats the purpose in the first place???
*Plus*, it's inconsistent with the way the built-in functions work.
Allin defended this discrepancy and we can argue about whether it's
defensible, but thereby the inconsistency fact itself is undisputed.
# with this, y is overwritten
list L = moo()
print y
</hansl>
Exactly, when you actually want to get at the returned list, something
might get overwritten. And again: I don't see this as a problem per se,
but you guys did and therefore the Feb 2015 change was introduced to be
able to avoid this "risk".
I'm sorry, but I can't see either the risk nor the inconsistency.
The opposite of "safe" is "risky", so if you call the former
"safe", I
think we can call this "risky"; but I don't care about the wording. And
see above for the inconsistency.
This discussion is getting out of hand; but as my last argument, please
recall how this all started: Allin didn't remember the rationale for all
this stuff you are now defending so ferociously as being more or less
self-evident! Now if this isn't telling you that there's something
conceptually fishy there, I give up.
IMHO currently this is a flawed design, and I'm afraid these type of
things might accumulate, but in isolation it's of course not super
important.
cheers,
sven