comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Is there a standard 'null' array?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is there a standard 'null' array? [message #34590 is a reply to message #34584] Mon, 31 March 2003 08:15 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 31 Mar 2003 01:40:27 -0700, Marc wrote:

>> P.S. There was talk of adding a zero-length-array type a few years ago,
>> but the consensus was that it's probably too late to fit it easily into
>> a 25 year old program.
>
> So what? If its now introduced, old code would not have to change.
>

I think it turned out that lots of code *would* have to change. For
instance, a nice use of zero-length arrays would be as a return from
WHERE:

b=indgen(10)
b[where(b lt 0)]=5

should work without fuss, by returning a ZLA, and permitting it in
indexing operations. But what about all the code that explicitly tests
for the value "-1" returned from WHERE? The only possibility is using
tons of /ZLA keywords to turn on that feature. Ugly.

There were many other instances of this type of problem. I think a
complete re-write of IDL which explicitly does *not* preserve full
backwards-compatibility might be sensible. This IDL++ could fix this and
hundreds of other problems tied to old mistakes and conventions.
Parallel release of IDL and IDL++ for a few major versions would ease the
transition. I'm sure the sheer anticipation of people howling and
screaming is enough to stop this plan in its tracks.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: positioning of IDLgrContour object
Next Topic: SEARCH2D VS REGION_GROWTH

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:04:14 PDT 2025

Total time taken to generate the page: 0.00710 seconds