Is this an OOP idea?

I studied data-oriented programming from chapter 2.4 of SICP, and then continued to study chapter 2.5. When I saw the "Type Tower" and "inherited", a thought flashed, is it the idea of ​​OOP? Each package represents an object, and the "type tower" shows the relationship between types that have the same meaning as "inherit" in OOP.

I am so excited and hope to find out the answer!

+4
source share
1 answer

Although the concept of a type hierarchy is introduced in Section 2.5, the mentioned “inheritance” is not general, like OOP inheritance. In the context of a number tower, a type inherits all the operations defined in the supertype, that is all.

In fact, in the second edition of SICP, OOP is not formally considered - although I think I once saw some SICP course notes on OOP, but they were not part of the book. The closest thing you get to OOP in SICP is the message passing method, but without inheritance.

Check your documentation for interpreting the Scheme, it is possible that a complete object system is included inside it, but it will have nothing to do with SICP.

+2
source

Source: https://habr.com/ru/post/1491443/


All Articles