3 ms·
How is abstraction (hiding) unsafe? Objects hide their implementation details. An object is only a valid abstraction if it correctly hides its implementation d
by Animats 12y ago
How is abstraction (hiding) unsafe?
Objects hide their implementation details. An object is only a valid abstraction if it correctly hides its implementation details and the user can ignore them. If there are hidden constraints on what a user can do with an object, but those are not enforced by the object, the object is an unsuccessful abstraction and a potential source of bugs.
Additionally, raw pointers are not dangerous.
Two words: "buffer overflow". C pointers lose size information.