Overview of Library Authoring
Library authors provide an invaluable resource to the IDL community — they develop domain-specific programs and applications that implement knowledge far beyond our level of expertise. User library code is often freely available, supported, and documented. However, as the number of library authors and routines continues to grow, it becomes increasingly important for authors to adhere to a routine naming convention within their libraries that avoids conflicts with core IDL functionality.
Most user libraries start out as small collections of code, and then grow. Initially, the naming issue is not very important. Over time, the library grows in complexity and number of users. Because this is often a gradual process, the importance of naming is not obvious until there is a conflict with IDL system functionality, or a conflict with another library author's code.
An understanding of the way IDL resolves routines during program execution reveals why new IDL system procedures and functions may periodically conflict with pre-existing routines written by users in the IDL community. (See How IDL Resolves Routines for step-by-step routine resolution details.)
The fact that IDL system routines always take precedence over user routines provides the following benefits:
In contrast, if user routines took precedence over system routines, a given installation could radically alter the meaning of common and basic IDL constructs simply by creating user routines with the names of IDL system routines. This would result in conflicts when sharing code, degradation of the common IDL language core, and ultimately, the reduced usefulness of IDL.
Although the way IDL handles the search for routines is simple, efficient, and reliable, it is not perfect. The potential for namespace conflicts exists. It is important to recognize and take steps to avoid these naming conflicts as described in the following sections: