logoalt Hacker News

Mikhail_Edoshinyesterday at 9:09 AM1 replyview on HN

Data will indeed be necessary. But data in OOP are interesting: they are not supposed to be directly visible. They are like the method body: there is one, but it is not important what it is. So if we add data, it will be that:

    class Aaaa
      (some data)
      method bbbb():
        (some code)
Do you think this is an object now?

Replies

usrnmyesterday at 9:48 AM

Yes, it is an object now, at least in my book. Public/private is less important, there are examples of OOP systems with private data being optional or non-existent at all, for example in Python.