Am 19.06.2015 um 22:09 schrieb Allin Cottrell:
But the data are _not_ gone, or not after the change I made in February
of this year. If you don't assign the return value of moo(), nothing
changes in the caller's dataset.
I don't really understand why the behavior should so crucially depend on
whether there is an explicit assignment to a new list object or not.
Because it's the list _members_ (or their names) that produce the side
effects, not the new list name itself. So if I do:
list newlist = some_list_returning_function()
and one of the list members is called 'cool' and I happened to have a
series 'cool' already in my dataset, then it is overwritten. How am I
supposed to know what the function uses for the names of returned list
members?
AFAICS this has always been a problem with using lists. Exceptional, as
Jack said, yes; but not new. Or am I too tired and missing something?
So I don't see this February change as a solution.
IMO that's not a reason to stop using lists. But I think it _is_ a
reason to resist Sven's suggestion that the error resulting from giving
an anonymous, on-the-fly, function-returned list as a function argument
is a gretl bug. I thought it was a bug, at face value, but now I don't
think so; I believe it's a defensible safeguard. However, the resulting
error message should be clearer.
Better error message, yes absolutely. But see above, how is the explicit
assignment requirement really a safeguard? I'm puzzled.
thanks,
sven