|
Punishment of a cruel and unusual nature.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
NOOOOOOOOOOOOOOOOOOOO
Real programmers use butterflies
|
|
|
|
|
I do what I want to do - what makes sense for what I'm doing.
Every now and then I'll be inspired to wrap functionality into a class - as much for readability as anything else.
Probably because I grew up with that old fashioned idea of a .lib file or something.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
That's exactly what I do, even for the sake of encapsulation.
The only difference being a translation unit instead of a class.
Any way that gets the job done is fine.
|
|
|
|
|
Let's face it: C is a successful programming language. C++ has its drawbacks. Java is a pile of crap.
In this regard, how good is OOP?
|
|
|
|
|
C# is pretty great, but then I'm just being difficult.
Real programmers use butterflies
|
|
|
|
|
C# enforces OOP. That's no good.
|
|
|
|
|
OO isn't a problem unless you turn it into a problem.
Unfortunately, a lot of people manage to.
Real programmers use butterflies
|
|
|
|
|
Lua (and C++), for instance, doesn't do that and it simply feels better sometimes.
|
|
|
|
|
I've seen plenty of people, including profs who should darn well know better try to use C++ as an object oriented language.
It's one of my peeves.
I want to buy anyone that does it a copy of Accelerated C++ by Andrew Koenig and Barbara Moo, so that they can learn the more effective way to abstract in C++
Real programmers use butterflies
|
|
|
|
|
The problem with professors is they want to teach their students 'low level stuff', like, for instance, arrays, using C++ . It can be done, of course, but it isn't, in my opinion, the smartest way to start teaching C++ .
Might be there are also very-old-school teachers that don't appreciate (or simply are unaware of) the powerful OOP support C++ provides. But I believe this is a negligible minority.
|
|
|
|
|
generic programming is something anyone can learn easily for about $25-$30 using Accelerated C++ - too bad it's not a textbook
Real programmers use butterflies
|
|
|
|
|
That's self-teaching.
Professors, on the other hand, exist for different purpose (produce chaos in student minds).
|
|
|
|
|
CPallini wrote: C# enforces OOP. That's no good. I think the real world is similar. They always want me to, say, distinguish between different people when I see them as a homogenous grey map. They even try to tell that this "object" belongs to "that" object, while I think I should be free to use anything the way I want to. They even say that there are things I am not allowed to look at, it is their "private life". This idea of the world being split into distinct "objects" really bothers me.
|
|
|
|
|
Now you are going philosophical.
|
|
|
|
|
Any tool even a lame one is as good as a person using it.
OOP is great when used and applied correctly.
|
|
|
|
|
You know, the right tool for the right job. For certain jobs OOP is simply not the right tool.
|
|
|
|
|
Agree...
More and more I'm starting to think we have been going the wrong way.
The article that really had me started thinking about this was this one:
https://medium.com/better-programming/object-oriented-programming-the-trillion-dollar-disaster-92a4b666c7c7
Excellent article.
The simplest pieces of code we try to make so abstract that at some point it doesn't make sense anymore and gets hard to understand. You end op with classes like: OrderManagerProviderOrchestrator or OrderFactoryStrategy. And all of this because, you know, SOLID, KISS, abstraction, dependency injection, blah blah blah,...
We spend so much time making code that way, making it independent, scaleable, etc. But in the end, whenever some change it necessary: oh no, this means we have to refactor everything!
|
|
|
|
|
Agreed, and thanks for the link. It gives me some reading for this morning =)
Real programmers use butterflies
|
|
|
|
|
your link links back to the lounge btw. I had to copy it out to get it
Real programmers use butterflies
|
|
|
|
|
|
it was worth it. Thanks for the link
Real programmers use butterflies
|
|
|
|
|
the main take away from this article could be summarized like:
" I’m not criticizing Alan Kay’s OOP — he is a genius. I wish OOP was implemented the way he designed it. I’m criticizing the modern Java/C# approach to OOP..."
The second thing: the article writer talks about OOP and there no mentioning about one of the best OO system -- Smalltalk which was a result of Alan's efforts at Zerox PARC.
|
|
|
|
|
Maybe you were too quick in summarizing it:
"Yes, of course Smalltalk is a proper OOP language — however, it is not in wide use. Both Smalltalk and Erlang make use of OOP the way it was originally intended by its inventor, Alan Kay."
|
|
|
|
|
Same.
After doing C++ for a couple of years, I've mostly restricted object design to db models and very rudimentary abstractions over external services and data sources.
I feel like in OO design, too often we build abstractions on top of abstractions in a weird attempt to clean up ugly datasets, that somehow feel wrong to us on a basic level. 95% plain data and 5% esoteric? You can bet someone over-engineered a solution so the 5% can now be deduced from model-state alone.
Every year I spend more and more time reversing situations like that, just to keep projects manageable. Cutting factories, flattening inheritance trees, and sometimes even re-introducing the dreaded 2% data redundancy that took 15 objects to solve.
IMO, people are inherently bad at abstraction, so it's in our best interest to KISS.
|
|
|
|