On Fri, Jun 28, 2024 at 2:48 AM Mike Schinkel <m...@newclarity.net> wrote:
> >> and inheritance is not meant for code reuse. > > Just because code reuse in inheritance can be problematic it does not have > to be in all-cases. Moderation in all things. I used that approach for 10+ > years and never once had any of the problems people claim about using > inheritance for code reuse. This was likely because my needs were > constrained by the use-case and by nature did not grow out of control with > complexity. > My experience is the opposite. There are subtle bugs I keep running into with static function and properties causing unexpected behavior. I'm not against having static classes open by default for the sake of consistency, though my preference would be to avoid the headache altogether and just make them final by default so I won't ever have to deal with it. Would traits not solve the problem of horizontal reuse?