On Sat, 22 Jan 2011, Sven Schreiber wrote:
> Not really. If you want to use something as a black box, yes.
IMHO it's absolutely clear that sometimes you want to have a black box.
You said it yourself, only that you then say "well, use functions".
And I'll say it again, and again, and again.
Another solution would be to require script authors to do the
garbage
collection themselves, i.e. issue the needed 'delete' statements. I was
arguing for a kind of automatic garbage collection by limiting the scope
of variables, maybe because I'm lazy.
I agree on your analysis ;-)
Also, that would probably require the declaration of explicitly
global
variables. Perhaps the disadvantages of those changes are too serious.
Fair enough, I could understand that. But it should be acknowledged that
it is a real limitation of gretl to have only global variables (apart
from the function scope), not to turn that around into a feature.
I will _not_ acknowledge that's a limitation. No, sir. It's a feature,
which encourages clean script writing. In a _compiled_ language (with
header files etcetera) I can see the scope of file-local variables. In an
_interpreted_ language, hmm...
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti