Allin Cottrell schrieb:
On Fri, 26 Jan 2007, Sven Schreiber wrote:
> So the function package does not honor the [null] default setting.
> Nothing too serious, but a little annoying.
Thanks, I now see what you mean.
It seems to me: whether this is a problem or not is a bit subtle, and
depends on the context. When a function gives a [null] default for a
list argument, is it saying A or B?
A: "I'd normally expect a list here, but if you don't want to give one I
can manage without"
B: "A basic invocation of this function wouldn't have a list here, but
if you want to get fancy you can specify one"
I presume you have case B in mind, but in case A the behaviour you
describe you not, I think, seem wrong.
Yes I guess I have B in mind; but even in case A, currently gretl in
fact tries to "outsmart" the user and/or function developer. What if
there are several lists defined, which one does gretl choose to select
initially? (Haven't tested this, but I guess the last one created, which
may have nothing to do at all with the function package.)
Don't get me wrong, I could also live without the possibility to define
a default at all, so I don't mean to whine about it or push it. But
since that option is there, I'm wondering what it's good for if it isn't
honored? Gretl seems to treat it differently depending on whether it's a
plain function or inside a package, and that difference really would be
problematic I think.