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

Home » Public Forums » archive » Negative array indices
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: Negative array indices [message #73903 is a reply to message #73811] Thu, 02 December 2010 17:28 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 2, 10:35 pm, b_gom <b_...@hotmail.com> wrote:
> Another example is the new list and hash objects. The documentation
> does a good job describing what their methods do, but doesn't really
> explain what they are better for than arrays and structures, and what
> performance trade-offs to be aware of. I guess that is where your new
> book comes in..

I had not even noticed that the documentation did not mention
motivation. Maybe all the many requests for lists, hashes and negative
indices over the years (mine, for one) left them with the impression
that everyone already wanted them. Negative indices are a good
syntatic sugar (basically and abbreviation for things like
a[n_elements(a)-1] and b[0,(size(b,/dimensions))[1]-1]), and I find
them very useful, but they are not even close in importance to lists
and hashes. I was leaving IDL for Python because of the lack of lists
and hashes.

In nearly every program I write I need a dynamic, possibly
heterogeneous container. Without lists, it is too much work to have to
predict or alter the dimensions of arrays, or handle (particularly,
read) several layers of indirection through nested pointer arrays. And
I usually have a bunch of different variables to keep associated,
where structures are too awkward to use because their are static.
Usually because the code needs to deal with data that can come in
varied forms, not known at compile time (being a dynamically typed
language is one the main factors in my choice to use IDL).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Graphics Challange
Next Topic: Convolution Kernel

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

Current Time: Sun Nov 30 18:37:09 PST 2025

Total time taken to generate the page: 0.88262 seconds