2 ms·
The two footnotes are good counter-arguments. The only time I can imagine making a class final (can't extend) is when it's a matter of security (e.g., Java's St
by brnstz 13y ago
The two footnotes are good counter-arguments. The only time I can imagine making a class final (can't extend) is when it's a matter of security (e.g., Java's String class).
Then there is a matter of "well, it's not MY fault if you didn't use the public API and your code is now broken." I recall even Steve Jobs chastising developers for doing this.
Building something with a sensible yet strict privacy model takes a lot of upfront design. Makes sense for code that will be used by the masses, but maybe not for a small project.