10.2 Renaming

A renaming declaration in Ada declares another name for an entity. Ada allows you to use renaming declaration for renaming of objects, exceptions, packages, and subprograms and entries. All available properties are not changed. The use of renames construct in Ada is the best way of avoiding naming conflicts and reuse of existing components. This allows you to build a layers of abstractions which is vitally important technological support for reuse.

with Table_Manager;

Package New_Table_Manager is

Package New_Table_Handling renames Table_Manager;

------------------------

procedure Display renames New_Table_Handling.Display;

end New_Table_Manager;

Guideline1 : Always use renames construct to avoid naming conflict which is the best way to reuse of existing ( library ) components; that means never define use construct when importing library units.