Am 19.06.2015 um 20:42 schrieb Riccardo (Jack) Lucchetti:
On Fri, 19 Jun 2015, Allin Cottrell wrote:
> I don't see any easy way around this, but I'm open to suggestions.
Well it was a design decision long ago, right? I could come up with
various suggestions (mostly involving namespaces I guess, which
essentially would feel very much like turning the list concept into a
bundle of series, which would be much cleaner), but currently I tend to
think that that's simply the way it is. (The side effect on the outer
scope, I mean.)
I don't have a solution, but I'd like to contribute to the discussion
with a reflection. Everybody loves lists. They're so convenient.
However, they have this feudal privilege (that no other gretl citizen
has) of being somewhat exempt from the principle of strict localisation.
This can be VERY troublesom, at times.
Yes you can come up with disturbing examples, but again, that's nothing
new. It reminds me like Numpy is passing arguments by reference (what we
call pointers basically, instead of copying the data) by default for
performance reasons; if you're not aware of that you get strange effects
on your outer scope, and you simply have to know it. Same here I think.
For a while now I have been quite "ambivalent" about lists. Actually,
the reason I used them now was only that the "mle" block seemed to
insist on defining the likelihoods as a series instead of a matrix (is
that actually correct?).
thanks,
sven