On Fri, 1 Jan 2016, Allin Cottrell wrote:
In relation to mkarray(), I floated the idea of merging this with
array() in
http://lists.wfu.edu/pipermail/gretl-devel/2015-December/006373.html
and Jack responded enthusiastically in
http://lists.wfu.edu/pipermail/gretl-devel/2015-December/006374.html
However, I'm now thinking that the merger is not such a good idea, on account
of the ambiguity of something like the following: [...]
I share you concern. In general, I tend to think that we shouldn't have
too many native functions and having two functions that sound nearly the
same and do nearly the same thing would lead people to confusion. I
already have to check every time which one is "varname()" and which ones
is "varnames()"... but I see your point. As far as I'm concerned, go with
the solution you like best.
Second issue: at present the "print" command as applied to
an array gives
fairly minimal information. For example, the input
<hansl>
strings S = mkarray("happy", "new", "year")
print S
</hansl>
produces the output
? print S
Array of strings, length 3
But we also have the undocumented function putarray(), which gives a basic
printout of the array members, as in
? putarray(S)
happy
new
year
Here, I'd like to canvas the options (a) keep what we have right now and
document putarray(), or (b) make the "print" command do what putarray() does,
and scrap putarray(). (Bear in mind that the array in question might contain
huge matrices rather than short strings.)
Or perhaps something in between, as in
? print S
Array of strings, length 3:
[1] happy
[2] new
[3] year
Do you like this?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------