[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Functions and arrays

William Clodius wrote:

> Allowing '[]' to replace '()' may be a good idea, but it can provide a
> maintenance problem for old code.

IMHO such a change would cause too many problems with maintenance.
I'm working on a very large software package (10's of thousands
of lines of IDL code) that has to run on both highest
and lowest common demoninator IDL systems (currently 4.0.1
is the lcd). If IDL 5.0+ changed the syntax, I'd have to have
2 copies of the code, not to mention the time it would take
to update the old code to the new standard. Unfortunately, due
to IDL's high prices at present, I couldn't persuade all my
users to upgrade to IDL 5.0. 

I think having a choice of either () or [] would also be
confusing and bad practise. It seems to me that the compiler
checking for and flagging/resolving these problems is the
best solution. Especially as no programmer would try and give an
array and a function the same name in the same routine, would they? :)