Hi, Christian; thanks for your mail. > What I would propose instead is: > make the parameter name "self" mandatory for methods, and turn > everything else into a static method. In my experience, significant omissions (i.e. something being important because it is *not* there) often give beginners trouble. For example, in C++, you can't tell whether: int foo::bar(int bah) { return 0; } belongs to instances, or to the class as a whole, without referring back to the header file [1]. To quote the immortal Jeremy Hylton: Pythonic design rules #2: Explicit is better than implicit. Also, people often ask why 'self' is required as a method argument in Python, when it is not in C++ or Java; this proposal would (retroactively) answer that question... Greg [1] I know this isn't a problem in Java or Python; I'm just using it as an illustration.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4