Advantages of ADTs for program modularity.

Chris Harwell
1 min readMay 2, 2019

ADTs(Abstract Data Types) can be quite difficult to grasp if you don’t have a computer science background or if you have never used a Object Oriented programming language. But understanding what they are and the advantages they provide can be quite beneficial for your programming career or hobby.

1.) Abstraction:

the user of an ADT doesn’t need to know or even understand any of the implementation details of the ADT, which reduces the complexity of the programming task.

2.) Localization of bugs:

if there are bugs either in the representation or implementation of the ADT, the bugs are local to the ADT, and can’t be caused by code that uses the ADT.

3.) Localization of changes:

if the programmer decides to change the representation of a ADT (i.e, to change the representation of a set from a linked list to a stack or array), then only the implementation of the ADT need be changed; code that uses the type is not affected.

4.) Encapsulation

encapsulation or “black boxing” ensures that data cannot be corrupted, and ensures that your code-base is free of errors

5.) Robustness

Your programs will be robust and have the ability to catch errors and prevent exceptions.

--

--