[moving over to gretl-devel, where I probably should have started this
anyway]
Am 21.01.2011 17:39, schrieb Riccardo (Jack) Lucchetti:
On Fri, 21 Jan 2011, Sven Schreiber wrote:
A few remarks:
* We don't have "clear", which would probably be nice, but we have
"nulldata": "nulldata 2" probably does what you want.
Yeah, except that it also clears the dataset, which is maybe not what I
want. Maybe 'nulldata' could be merged into a new 'clear' somehow?
clear --data # like nulldata --preserve
clear --all # like nulldata
clear # only clear variables like matrices, scalars, bundles,
strings, lists(?)...
???
(This is clearly a suggestion I only dare making in the context of the
pre-2.0 cycle, in general I would find it too disruptive.)
* The relative merits of strong typing vs weak typing will always be an
object for discussion. I personally prefer strong typing, but I concede
that in a world where the most popular matrix-oriented languages are
weakly-typed perhaps you have a point.
My point was not against strong typing in this context (although it
helped to trigger the error here, of course). It would be fine if in the
scope of the script the type of temp were fixed (strong typing). I'm
pointing out the problems of the fact that the scope of the variable
temp is automatically global, i.e. extends beyond the current script.
* I would guess that if you have scripts that are meant to be run one
after another with little or no editing, perhaps you ought to use
functions and keep the usage of global variables at a minimum. Perhaps
bundles may help too.
AFAICS this essentially would imply that *everything* needs to be
wrapped inside functions. I don't think that would be good. Note I
didn't *want* to make thiese variables global, but with gretl's current
behavior I don't have a choice (if I don't want to wrap everything in a
function); so I view your statement "keep global variables at a minimum"
as supporting my point!
thanks,
sven