Is OO design's strength in semantics or encapsulation?

后端 未结 11 1400
余生分开走
余生分开走 2021-01-30 23:28

Object-oriented design (OOD) combines data and its methods. This, as far as I can see, achieves two great things: it provides encapsulation (so I don\'t care what data there is,

11条回答
  •  旧巷少年郎
    2021-01-31 00:05

    Object-oriented design's strength is proportional to how much late binding occurs in the design. This is the Kay notion of OO, not the Nygaard notion. Alan Kay wrote:

    OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.

    Much of the literature ignores late binding in favor of the C++ idea of object orientation.

提交回复
热议问题