By making the self reference explicit, you're free to refer to any object by that self reference. Also, such a way of playing with classes at runtime is harder to do in the more static languages - not that's it's. 1) methods are just functions that happen defined in a class, and need to be callable either as bound methods with implicit self passing.
For a language-agnostic consideration of the design decision, see what is the advantage of having this/self pointer mandatory explicit?. To close debugging questions where op omitted a self. Self - this refers to the current class name.
So self::baz() is the same as foo::baz() within the foo class (any method on it). How to create a self-signed certificate with openssl the commands. Nov 1, 202215 as the subject suggests, even if publishing with "--self-contained true" (and with a specific -r option), the runtime still asks for missing .net installation.
B 's self.x is an instance variable. It would be easier to demonstrate the difference with something that can be modified like a list: