A
Amir Michail
Hi,
I was wondering if there is a tool that will perform some heuristic
checking of actual and formal parameters to warn about likely errors.
Such a tool could check that formal and actual parameters have similar
names.
For example:
def plot(x,y): ...
plot( x1, y1 ) # ok
plot( y1, x1 ) # not ok, but this is ok: plot (x=y1, y=x1)
plot (1, y) # not ok, but this is ok: plot(x=1, y)
We can take this further:
avg = x1 + x2
plot( avg, y) # ok since avg gets name x from x1, x2
Does this make any sense, even in a heuristic sense?
Does such a tool already exist? Would it be useful?
Amir
I was wondering if there is a tool that will perform some heuristic
checking of actual and formal parameters to warn about likely errors.
Such a tool could check that formal and actual parameters have similar
names.
For example:
def plot(x,y): ...
plot( x1, y1 ) # ok
plot( y1, x1 ) # not ok, but this is ok: plot (x=y1, y=x1)
plot (1, y) # not ok, but this is ok: plot(x=1, y)
We can take this further:
avg = x1 + x2
plot( avg, y) # ok since avg gets name x from x1, x2
Does this make any sense, even in a heuristic sense?
Does such a tool already exist? Would it be useful?
Amir