Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I think I finally get why Harper called

Name: Anonymous 2014-11-22 6:58

OOP "inherently anti-modular".

You see, in object-oriented programming (as opposed to class-oriented programming like C#) objects' structure is mutable. You can add, remove and modify slots and methods any time you want. But what happens if one imports an object from another module and expects that object to have a method hax of the type Anus -> HaxedAnus? That's right, that method could disappear at any time, or it could change to an int -> () at any time (e.g. as a result of sending other messages from that module), and everything breaks down. So in OOP, a module can't really export a reliable abstract specification of itself. The only thing you know about another module without seeing the implementation it encapsulates is... nothing! That's why OOP is indeed inherently and by design anti-modular.

Name: Anonymous 2014-11-23 2:11

>>10
Any language with runtime reflection can break through any encapsulation as well.

Not true. With real encapsulation, the reflection is done with message sends which are handled by the receiver. The language itself doesn't really "have" reflection, the objects themselves do. The receiver can be made completely impenetrable by refusing to participate in reflection.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List