Limit the Scope of Data Declarations

Limit the Scope of Data Declarations at the smallest possible level is consistent with the well known principle of data hiding. It stops one module from inadvertently referencing and modifying data values which are only meant to be used by another module. It also improves the clarity of the code.

Limiting data declaration scopes improves model checking because it reduces the number of data elements and statements that must be tracked during analysis in order to verify properties of interest.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.