Re: Another small V8.0 bug [message #71871 is a reply to message #71866] |
Tue, 27 July 2010 07:39   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Chris wrote:
> On Jul 26, 9:31 am, Craig Markwardt <craig.markwa...@gmail.com> wrote:
>> On Jul 26, 2:15 pm, wlandsman <wlands...@gmail.com> wrote:
>>
>>> On Jul 26, 1:59 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
>>>> Do you mean that this does not happen every time? To me this seems to
>>>> be the expected behavior. The line
>>>> print,list(0)
>>>> Is creating a list (which is an object), containing one element, and
>>>> printing it. The same with the use of help.
>>> OK, I did not know that list() was a new intrinsic function,
>>> thanks. But since "list" is my most used variable name, V8.0 is not
>>> backwards compatibile.
>> Wow, through sheer luck, I've never used an array variable named
>> LIST[]. I have mixed feelings about introducing such a potentially-
>> incompatible change into IDL.
>>
>> Craig
>
> Note that this doesn't seem specific to list -- in IDL 8, any object
> (user written or otherwise) can now be created with the command
> x = object_name(args)
> as well as
> x = obj_new('object_name', args)
Crikey. I hope the documentation clearly states how to turn that default behaviour OFF in one's idl_setup.pro file.
Because, you know, ITTVIS *did* make this behaviour user selectable, right? RIGHT?
:o)
I have arrays called "list" all over my code - most of which are arrays of objects (for my own homegrown pre-v8.0 linked
list). I strictly adhere to the [] convention for array indexing so I doubt this will affect me. I can't recall if I
have a function called "list" anywhere though....
I dislike the
x = object_name(args)
alias for the regular
x = obj_new('object_name', args)
because it now means you should include a comment in the code telling the future maintainers what is happening. That is,
rather than doing something like:
x = obj_new('list',args)
you'd do
; Create a list object
x = list(args)
I'm all for syntactic sugar, but this is more like aspartame (groan :o) -- it's obfuscating what was before, IMO, a
clear indication of what was happening. Now users will have to maintain (or, worse, debug) both the object creation
*and* the comment.
cheers,
paulv
|
|
|