Explain what are The Advantages Of Using Packages?

Category: QuestionsExplain what are The Advantages Of Using Packages?
Editor">Editor Staff asked 2 years ago

Explain what are The Advantages Of Using Packages?

1 Answers
Editor">Editor Staff answered 2 years ago

The main advantages of using packages are given as follows:
Encapsulation —Packages provide encapsulation of all the logically related constructs together in a single module, which is easy to code and understand.
Better application design —Both modularity and encapsulation leads to better designing of applications. Separate package specification and body helps in simplifying the coding and better definition of the subprograms.
Hiding —Public and private constructs can be defined and declared so that any definition can be hidden to protect integrity of the package. Any changes in the private constructs only need the package body to be recompiled without the need for the entire application to be recompiled.
Better performance —A call to any construct within the package loads the entire package in the memory; therefore, enables better performance of the application.