What is the name of the concept that distinguishes between the static and instance attributes

The concept of public and private variables is called visibility.

I am looking for a short word that describes the difference between static attributes and instance attributes. Is the area suitable?

+4
source share
1 answer

I think that “ownership” or “attitude” is better suited, and the meaning may also be slightly different in different languages.

For example, in Python there are three types of such ownership:

  • Attribute / method of the instance - belongs to the instance (or the instance owns it)
  • Class method - belongs to the class (the class belongs to the attribute or method, here we can consider the class itself as an instance of a higher level class)
  • / - ,

++ . , .

php ++, , , . , . "" , "" ( ).

"scope" - , , , / . , x , , .

+1

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


All Articles