发现 OOP 对于 java 来说,仅仅是一个 a.b()的 notation 和把数据和函数定义在一起的 class 而已,所谓的 everything is an object 没有任何意义,完全是句空话。 这就好像是说 java 其实是一门 FP 语言,因为它支持 higher order functions
object 在 smalltalk 里是非常灵活、高度可交互的
The basic idea of “object” is to invest a “full virtual computer” so it can provide useful services via messages in a machine independent way and with enough encapsulation to be safe against attack.
This also means that everything can and should be an object because (a) a full virtual computer can simulate any other kind of thing, and (b) because this also allows objects to be self-defining, self-documenting, etc.