On Fri, 9 Sep 2011, Sven Schreiber wrote:
Am 09.09.2011 03:32, schrieb Allin Cottrell:
> On Wed, 7 Sep 2011, Sven Schreiber wrote:
>
>> here's some suggestions for how to improve (IMHO) system estimation in
>> gretl (or hansl for that matter):
>>
>> 1) The basic system spec syntax is a bit awkward:
>> 'system ... end system'
>> should be like a parenthesis, as in 'if ... endif', 'loop ...
endloop'
>> etc. Hence the keyword 'system' should be at the beginning of the line.
>> So instead of:
>>
>> mysysname <- system
>> ...
>> end system
>>
>> it would be better to have:
>>
>> system -> mysysname
>> ...
>> end system
>>
>> or something like that. (Of course such a syntax reform would be
>> something for gretl 2.0.)
>
> Sorry, Sven, but I don't really get that. We don't have much of the
> "pointy arrow" business in gretl (and maybe we should have none of
> it) but its role in gretl syntax is to handle a command (or command
> block) that is acting something like a function, in that it offers
> some sort of assignment. In all the computer science contexts that
> I've come across (and notably in R, with which at least some gretl
> users may be familiar), the idiom is
>
> assignee <- <thing offering assignment>
>
> I'm not sure if you're proposing that all such arrows be reversed,
> or just the one for "system", but we need consistency, and I don't
> see how reversing all the arrows (mle, gmm, plain single-equation
> models, graphs) would improve/clarify matters.
>
> Maybe I'm missing your point. If so, please elaborate.
>
My point was only that the keyword 'system' should be at the beginning
of the line, because then it would --together with 'end system'-- form a
code block also in a visual sense which makes it easier to see the
structure of the code. I did not really want to make a definite
suggestion on how the rest of the syntax should be changed.
However, your response indeed was illuminating: As a matter of fact, I
remember that to me the pointy arrows have always felt somewhat "alien"
in the context of the rest of what is now known as hansl. So maybe it
would indeed be a good idea to ditch them. I mean it's fine for R, where
assignments are done with such arrows, but in hansl assignments are
generally done via the = sign.
Just to give another example of a syntax possibility, instead of:
'mysysname <- system'
one could have:
'system --name="mysysname"'
which would look and feel much more gretl/hansl-like IMHO. (And
analogously for the other pointy arrow cases.)
But well, of course that would be a rather drastic change, and the net
payoff might be questionable.
In fact we had something like the --name=foo syntax for a while,
just for systems, but we ditched it on the grounds that it was
inconsistent with the pointy-arrow syntax for regular models and
graphs.
Yes, I agree the arrows don't seem entirely natural in hansl, but on
the other hand they are performing a specific task which is neither
assignment in the usual sense, nor just exercising an option (as in
--option=optval), namely assigning the result of a command (not a
function) to a named object. So it seems OK that a special symbol is
used for that special task.
Allin