Am 17.09.2021 um 11:06 schrieb Sven Schreiber:
Am 16.09.2021 um 22:12 schrieb Allin Cottrell:

FWIW, the "to" in a range of lags is a RATS-ism from way back. I'm not
too keen on propagating it to other contexts.

I agree, harmonization the other way around would be more sensible.

Let me revive this old thread. Not urgent, but I stumbled over a note on
this again.

So, if we agree that the "to" lag ranges expression is not overly
gretl-idiomatic, why not allow the equivalent syntax y(-1 .. -3) ? (Of
course "to" would have to be supported for a long time, maybe forever,
but wouldn't have to be mentioned anymore, necessarily.)

Or could there be a problem that gretl interprets an expression like "(1
.. 3)" as a list-creation thing?

There's yet another range symbol: ':' in matrix indexing, M[1:n,]. The
thought has crossed my mind to change the standard loop range spec to

loop i=1:N # as in R

but I think it's too late. We'd surely have to support the original
syntax as well, so it would add complications.

Right; and gretl's 1..N is already quite nice since it's very close to
the math formula formulation of 1...N (or 1 \ldots N).

Perhaps we could keep in the back of our head the possibility to allow
".." for integer ranges in more contexts. Including matrix indexing as
in M[1..n,].
Again, why not allow ".." in those cases where ":" stands for a range,
so for matrix indexing. (The other semantic meaning of ":" in hansl that
comes to my mind is in the ternary statement like "isittrue ? takethis :
notakethat". In the long term this change would therefore even simplify
things a little bit.

Finally, let me repeat a potential nice side effect could be to have
{start..stop} as an alias for seq(start,stop). Again, I admit that this
is a matter of taste.

We don't have to discuss this now, I can also open a ticket for later.

thanks

sven
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to