data hiding | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

data hiding

What is the work of " data hiding "?

13th Jul 2019, 12:22 PM
Reham Abdullah
Reham Abdullah - avatar
4 Answers
+ 5
Back in the old days most data was global modified everywhere. This lead to errors that where impossible to track down because you couldn't find the code screwing up the data. By hiding the data using getters and setters, you have one location that all modifications are done making it simple to find and fix the bad code.
14th Jul 2019, 2:26 AM
John Wells
John Wells - avatar
+ 2
To prevent those same issues. All languages support bad coding practices. Some make them harder, but they don't force good techniques.
14th Jul 2019, 6:58 PM
John Wells
John Wells - avatar
+ 1
John Wells is there any use of data hiding in today's world???
14th Jul 2019, 6:53 PM
mn121
mn121 - avatar
+ 1
John Wells thanks...😄😄😄
15th Jul 2019, 11:38 AM
mn121
mn121 - avatar