3 ms·
> And this guy has supposedly been writing in OO languages for decades? What? This is the bit i don't get. It's like he learned OOP in the '90s, when everyone
by twic 10y ago
> And this guy has supposedly been writing in OO languages for decades? What?
This is the bit i don't get. It's like he learned OOP in the '90s, when everyone thought inheritance was rad and nobody had realised how terrible mutating shared state was, and then fell asleep for twenty years. None of this article, none of it, has any relevance to how OOP is practiced by informed people today.
- ambicapter 10y ago> It's like he learned OOP in the '90s Well, if he's been doing OOP for decades, isn't that likely to be the case?
- flukus 10y agoThe keyword there is informed. There are still plenty of shops that practice OOP this way. I'm working at one right now and there are OOP horrors around every corner. Unfortunately, they seem intent on adding more mutable state rather then eliminating it.
- vikiomega9 10y agoDo you have anecdotes you can share? :D
- flukus 10y agoQuite a few, but the worst would be the custom logger. I got lost trying to trace the inheritance graph. which spans projects, and the dependency graph, loggers within loggers within loggers. I gave up when I ran out of space trying to sketch the relationships in my notepad. Being encapsulated means you don't actually have any control over the logger, or the threads it spins up. Creating a logger for a new app requires inheriting from a application logger (which is already 3 or 4 layers deep in the inheritance hierarchy. The distinction other loggers make between the log interface and the appenders are non-existent. If you want to log to a new source (say the event log) you have to add a new layer to the inheritance tree. Then there's the fact that it's handling the application state, in an "on error resume next" kind of way. And this is a global state, so don't even think about multi threading. Naturally, actually accessing the logger is done via a singleton. It causes more problems than it helps resolve, and the ones it causes naturally don't have an diagnostic information available. There are plenty of others, but it's hard to top this tour de force of OO anti patterns. If only there was some free and stable alternative...
- GFK_of_xmaspast 10y ago> If only there was some free and stable alternative... There's no shortage of good-enough loggers out there for major languages.
- pkroll 10y agoThe ellipsis in this case appears to me to be a sarcasm indicator, not a real wish.
- goalieca 10y agoPeople use that crap today. Ever take a shake at wpf for windows? It's a fucking mess.