This follows up on
http://lists.wfu.edu/pipermail/gretl-devel/2016-January/006452.html
and the responses thereto.
Here's what I've come up with -- not fully implemented yet, so if
anyone has strong objections, please say soon!
1) The "constructor" functions array() and mkarray(), the latter of
which is so far undocumented.
I take Sven's point that the names of these might equally well be
reversed.
In languages of the C type we have the distinction between
"declaring" something (requesting that it exist) and "defining"
something (actually stating what it should look like). Along those
lines I'd be tempted to rename array() as declarray() and mkarray()
as defarray(). However, so as not to break backward compatibility I
won't rename array() -- the "declaration" function -- at present.
But I will rename mkarray as defarray(). This is now in git, but
reversible if there are strong objections.
2) "print" as applied to arrays, and the undocumented putarray().
I plan to scrap putarray(), and to redefine the action of "print" on
arrays to use a (hopefully) plausible heuristic. That is, if the
array is "fairly small" and its elements are also "fairly small",
print everything in full. But if the array contains 1000 matrices,
do what we've done up till now and just print something like "array
of 1000 matrices".
As I said before, IMO what exactly happens in "printing" an array
should really be up to the script writer: if you don't like my
heuristic for your context, write a more suitable one!
(Planned but not yet in git.)
Allin