Fundamental data structures like lists and hashes have been needed in IDL for some time, but IDL 8.0 introduces them along with some related features/syntax for object-oriented programming to make them even more useful.

A list is simply a sequentially ordered container of items of any type. You can add/insert items, remove items, look up an item at a given index, etc. It is similar to an IDL_Container, except that it allows its items to be of any type, not just objects (and the items don’t have to even all be of the same type). For example,

Norvig’s Python implementation uses some list features that IDL does not have like list comprehensions, but IDL’s lists and hashes were up for the task (though it’s regular expressions were not and I had to make a few optimizations to get IDL’s implementation to a reasonable speed, so the first time you run mg_spellcorrect will take longer while it generates the word list and saves it away).

I have my own list and hash classes which provide similar functionality, but require elements of lists and keys/values of hashes to be of a single type. This provides a bit of extra performance (and in practice I never needed to have a single list or hash containing items of differing types) against earlier versions of the IDL list and hash objects, but lists and hashes are faster in the final IDL 8.0 release, as seen in this comparison between adding items to standard arrays, lists, and MGcoArrayLists:

UPDATE 2/23: Fixed x-axis scale on above graph. Code for running the test is available (though the graphics code requires a bunch of my private routines).

Yes, you need to update your license for IDL 8.0; that’s the normal process for a new release. Note however, that IDL 8.0 has a new license manager, so if you use a license server read the documentation that comes with the license.

[…] a reference to get all them all listed in a single place, the IDL 8.0 related posts discuss lists and hashes, online help, IDL Workbench changes, distribution/licensing changes, operator overloading, other […]

Buy Modern IDL now!

Modern IDL offers IDL programmers one place to look for explanation, techniques, and reference material, for beginners and advanced users alike.

"... But I've always wanted a thorough, concise, up-to-date overview of the the IDL language and its vast capabilities. This is exactly what Mike's book provides in 464 very informative pages... Highly recommended!" —Mort Canty

About me

I'm a software developer focusing on high-performance computing and visualization in scientific programming. I work mostly in IDL, but occasionally use C, CUDA, and Python.

I work for Tech-X Corporation, where I am the main developer for GPULib, a library of IDL bindings for GPU accelerated computation routines.

I am the creator and main developer for the open source projects IDLdoc, mgunit, and rIDL.

Other

Feeds

GPULib

GPULib enables IDL developers to access the high-performance capabilities of modern NVIDIA graphics cards without knowledge of CUDA programming.

TaskDL

TaskDL is a task-farming solution for IDL designed for problems with loosely-coupled, parallel applications where no communication between nodes of a cluster is required.

mpiDL

mpiDL is a library of IDL bindings for Message Passing Interface (MPI) used for tightly-coupled parallel applications.

Remote Data Toolkit

The Remote Data Toolkit is a library of IDL routines allowing for easy access to various scientific data in formats such as OPeNDAP, HDF 5, and netCDF.

Modern IDL

Modern IDL offers IDL programmers one place to look, for beginners and advanced users alike. This book also contains: a thorough tutorial on the core topics of IDL; a comprehensive introduction to the object graphics system; common problems and gotchas with many examples; advanced topics not normally found are discussed throughout the book: regular expressions, object graphics, advanced widget programming, performance, object-oriented programming, etc.

IDLdoc

IDLdoc is an open source utility for generating documentation from IDL source code and specially formatted comments.