Sean Hoffman
Oct 17, 2024

--

This is a misconception. They *should* be easy to extend. But for whatever reason programmers get extremely protective over data and functionality. Overuse of 'private' (rather than protected) members as well as authoritarian use of the 'final' keyword severely limit extendability. I have encountered countless instances over the last three decades when I wanted to use someone else's work and I couldn't because of overt misuse of these features.

As a best practice, protected is better than private.

--

--

Sean Hoffman
Sean Hoffman

Written by Sean Hoffman

Software Developer (C++, C#, Go, others), Husband, Father. I eat fried potatoes annually on July 14th.

No responses yet