Am 22.06.2015 um 14:29 schrieb Ignacio Diaz-Emparanza:
El 21/06/15 a las 14:43, Sven Schreiber escribió:
>> ... and the caller assigns the return value.
> Part of my point is that there is no "the" (=one and only) return value
> when we talk about lists. There is the name of the list and that is
> assigned. Then there are names of the list members, and those *cannot*
> be assigned (=renamed) under hansl's design.
Umm I don't know whether I am understanding you, and I hate to talk
about my Holt-Winters package again, but I think its is an example of
what are you saying.
Yes indeed!
It takes a series as a paramenter (reskwh from data9-3.gdt in the
example) and optionally, if you assign a name to the list, it produces
the list with two series reskwh_H and reskwh_W. Obviously they are being
renamed for every series you apply the package on so they can be
rebnamed under hansl's design.
No, "renaming" in this context would mean that as a caller I could
choose to get the series that you named as "reskwh_H" by the name of
"no_I_like_this_better". That is not possible in hansl AFAIK.
> I understand that. But there still *can* be series-name collision
if the
> caller assigns a new list name.
Of course, if you call the function twice over the same series and
assign a name (may be different) for the generated list, the previous
series are overwritten.
I don't think it is a problem. In some sense I think it is a good
feature, for example if you want to repeat the analysis in different
conditions.
Well apart from the fact that by coincidence you could already have a
totally unrelated series named "reskwh_H" in your dataset, it's not me
who's saying it's a problem! It's Allin who's saying that it becomes a
problem when you call the function without assigning the list return name.
In fact that is the central part of my doubt: if it is seen as a problem
at all (which I'm not saying BTW), then why only in one case (anonymous
call) and not in the other case? This is inconsistent IMO.
The problem that may occur of overwritting some important previous
series should be resolved by the package programmer who should select
the names for the generated series carefully.
Absolutely.
I think in general is good to have a way of generating new series that
in some way may have names derived from an existing one, such as reskwh,
reskwh_H and reskwh_W, I don't think it is a good idea that the series
have prepended the name of the list.
I have no strong preference here. The argument there was about defining
a properly separated namespace. Prepending names is just one possibility
how to achieve this. But note I'm not pushing strongly for this, it was
just a related thought.
thans,
sven