News for hackers. Stuff that matters.
Re:Inheritance versus Composition by maxxxxx on Thursday May 09, 2019 @08:53AM (#19867816)
Is there a warning when someone overrides that isolation? In C# you can also access private members through reflection and I have seen people use that a lot instead of bothering to understand why the original developer decided to make the variable private.
Re:Inheritance versus Composition by TeMPOraL on Thursday May 09, 2019 @10:29AM (#19868587)
No, there isn't, because "we're all adults here". But you have to type :: instead of : to do this, which usually tells you something, and you don't have to go through reflection to do this, so such overrides don't cause performance issues. Common Lisp doesn't prevent you from accessing anything.
Re:Inheritance versus Composition by maxxxxx on Thursday May 09, 2019 @10:37AM (#19868658)
I wish we he had more adults instead of people fresh from college who think that best practices and things to avoid are obsolete and don’t apply to them :)
Re:Inheritance versus Composition by TeMPOraL on Thursday May 09, 2019 @10:45AM (#19868743)
That's the unfortunate nature of exponential growth. If the number of programmers doubles, say, every 3 years, that means at any point in time, half of the workforce has less than 3 years of experience.