Why do people not use OOP / don´t like it?
Replies To: Why not OOP?
I don't program with Flash but I always use OOP for programming games. I don't know how I used to code before I started using OOP.
among other things, if you can't do OOP, you can't do a big project and you can't re-use the parts from whatever project as easily.
I agree OOP is great! Makes any sizeable project manageable.
Were those people beginners, or what?
Without OOP, there wouldn't be any decent software.
Do you have any examples of people knocking on OOP?
I knock on languages that try to force OOP (like Java) in all situations even though it doesn't always make sense. At the same time, I am consistently annoyed by people who say that some languages (like C) are not (or do not support) OOP just because they do not force it down the developer's throat.
Exactly, I really hate language-programmer labels, but for things I do personally I always write C in object style. I think its important to do in C as it is easy to forget and write code that's hard to manage (because, if you want power, you have to write custom memory handling, abstraction, interfacing, etc.). Nothing is worse than a quarter million lines of C code that is a complete mess, as opposed to a quarter million lines of C code where it takes you moments to find what you want to work on.
I just picked up my lump of engine for NovaForce from weeks ago to get something done over the break and it was easy for me to jump right in since it was all organized in that fashion.
I would agree with WolfCoder. You do not have to use an OOP language to code with OOP principals. You do get a performance boost when you use just C over C++ but you have to be more careful for the reasons already stated. C#, Java, and others do enforce the OOP a little too strictly. In any event the ideas of encapsulation, inheritance and polymorphism do make life much easier for a programmer.
They are also trying to get programmers who program with functional languages to use OOP concepts.
I like it too even if it still confuses me.I am still trying to learn it and i am sure when i learn it my code will be as clean as ever.
Perhaps this is an issue with Flash or the Flash community (disclaimer: I've never encountered either personally, so this is pure speculation) rather than with OOP. Back in the early days of 4GLs and GUI builders, they were often sold as being either "object-oriented" or "object-based", which led to a widespread misperception that OOP was all about GUIs and that "object" meant "a thing you can see on the screen". Perhaps there is a similar misperception in the Flash world, given that Flash is also highly-associated with with graphics-oriented tasks?
As for my answer on the poll, I had to go with claiming that I only like it "a bit", even though I am a big OOP fan and rarely do much without it. I couldn't bring myself to answer "it rules!" because OOP is not a silver bullet, nor is it appropriate for use in every situation. It's a very good tool which is very widely applicable, but there are other tools out there, too, and there are cases where another one is a better choice.
I think the problem with flash is that with the release of AS3, which is a more OOP based approach to actionscript, lots of things that people had learned to do in AS2 were no longer applicable in AS3.
I code in flash quite a lot and found AS3 to be a much better way of programming, as opposed to my tangled mess of AS2 code chucked all over the place.
Ok, so first of all, the people stating that OOP isn´t good were not really professionals / masters, but not only beginners too. Also, I noticed these things a little sooner - like 2-4 years ago.
And, by the way, it was NOT about graphic-oriented things, dsherohman.