On Tue, 23 Oct 2018, oleg_komashko(a)ukr.net wrote:
In my opinion the answer depends on quantity of work and
possible problems resulting from less strict checking
A a variable is attributed by 'name', a function is attributed
by 'name('. At present I can't imagine what problems can
create even
matrix sin = seq(1,3)
Parser MUST distinguish sin from sin(
It does, but that leaves the problem of lags, as in series(-1).
Another question
Suppose pack1.gfn and pack2.gfn both has
private_pack private functions
I think the both should be mutually invisible
Handled. They are mutually invisible.
Yet another one
Suppose, pack1.gfn has public1() public
function
What to do if a user makes in a script
include pack1.gfn
function ret_type public1 ....
body
end function
In my opinion, running function segment
should give error:
function 'include pack1.gfn' is already defined in pack1.gfn
Handled. The current error message for that case is
"The function public1 is already defined by package 'pack1'"
Suppose, pack2.gfn and pack2.gfn both have
public1()
Suppose we first run
include pack1.gfn
then
include pack2.gfn
There should be a warning
public1() from pack2.gfn has shadowed
the same name function from pack2.gfn
Right now it's an "already defined" error, same as the case above.
For a user to avoid ambiguity she should
can use something like this
pack1.public1()
and
pack2.public1()
With an underscore rather than a dot, yes.
Allin