3 ms·
Imagined from the same fold as COM (which you are likely talking about) was CORBA, an international standard for "object" interoperability. Guess what came out
by necovek 4y ago
Imagined from the same fold as COM (which you are likely talking about) was CORBA, an international standard for "object" interoperability.
Guess what came out of that?
It's one of those systems that's perfect (as in perfectly abstracting away everything) but notoriously and impractically complex. COM is only slightly less so.
The downfall of all the object-oriented approaches is that we don't really think about objects, but instead of actions ("functions") we perform, which is much simpler as well. Basically, you don't see bread and say bread->eat() (or at least your doctor will tell you not to :)) but instead look for something to eat() and then stick bread in it once you find it (eat(bread)).
- vaughan 4y agoperson->eat(bread)
- necovek 4y agoThat's a good point. But as soon as you've got someone else who needs to eat (cat->eat(), dog->eat()...), it is still better to go with a functional approach: feed(person, bread) Basically, my abstraction was bad for that case, but it is so much easier to move from eat(bread) to eat(person, bread) and then rename that to "feed" than to introduce object inheritance/composition and think about the commonality between dog and person if all you want to do is feed them. Sure, there are cases where purely OOP approach is not burdensome, and may even be easier, but functional approach, as an explicit superset of possibilities, will usually be simpler and more understandable.