One things I quite enjoyed in some other languages, was that the community had an established notation for distinguishing static and instance members (functions, properties, etc.). This would be useful in written communication, documentation, and so on.
Some examples:
Language | Example class[1] function | Example instance method |
---|---|---|
Objective-C |
+[MyClass foo] , +foo
|
-[MyClass foo] , -foo
|
Ruby |
MyClass::foo , ::foo
|
MyClass#foo , #foo
|
Python | static MyClass.foo |
MyClass.foo |
Swift | ??? | MyClass.foo |
Do we have an established notation for this? If not, could we decide on one?
-
Or the equivalent. E.g. Ruby doesn't have class functions, there are just instance methods on a class' metaclass. âŠī¸