Hacker News new | past | comments | ask | show | jobs | submit login

What other choice is there? Old fashioned procedural? Logic rule driven? Some "other flavor of OO but lets not call it OO" (e.g. component entities)? From a paradigm perspective, there are really only two in active contention.



CES is definitely not a flavor of OO. It can be mixed with OO and it can easily be implemented in OO languages, but it's far from being OO. You can't say 'entities are objects so CES is object oriented' because entities are not objects in the OO sense.

So yes, the other options are static procedural and component oriented like CES. Interfaces without inheritance are also gaining popularity, I think this is what Go and Haskell do.


I guess it really depends on your definition of "objects." If it quacks like a duck, its probably a duck. Inheritance is not necessary at all for objects (since at least the Treaty of Orlando).


It's true that there's no definition of "object oriented" that fits every language that has "objects". But that also means that the term "OOP", without the context of a language, is useless in discussions, because it doesn't mean anything.

Like Java, Go and Javascript have "objects", but you all know how different they are. So don't make them equal by calling both of them "object-oriented". If structs in C were called "objects", would C be object-oriented as well?


Go is fairly OO in its own 1970s style. JavaScript is definitely OO and not many would argue otherwise. C is not: struts don't support encapsulation directly. However, many have invented or reinvented OOP in C (including me) with void* and hand rolled virtual dispatch tables (you can even find that in Linux). Heck, how do you think the first C++ compiler was written? And you could of course do objects in assembly...it's even easy given a few macros. [1]

OOP is simply programming with objects. If you have values that contain encapsulated state, and you are instructing them to do things with that state, you have objects and are doing OOP. You can do that in any Turing complete language, but some languages support it better than others.

[1] http://www.drdobbs.com/embedded-systems/object-oriented-prog...


It is possible to use OOP without taking the AbstractFactoryInjectorBean train all the way to the last stop.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: