For Work Reason I Installed Windows 7 for Some Investigation. The Interface Irks Me to No End…
For work reason I installed Windows 7 for some investigation. The interface irks me to no end…
Get Rid of Self
I think this has been addressed in the responses; it’s not as easy as you’d think, and there are important advantages to the uniform interpretation of methods as “just functions that get called in a funky way”. In Ruby, everything is a method, or an anonymous block, and there are no “free functions”. Python uses the complimentary approach, treating functions as first-class citizens. Both approaches are complete; they are however incompatible, and you can’t easily morph one into the other. (Personally, I find that the criticm of explicit self has about as much merit as the criticism of Python’s use of whitespace.)”
Why Do You Need Explicitly Have the ‘Self’ Argument Into a Python Method?
I like to quote Peters’ Zen of Python. “Explicit is better than implicit.”
I In Java and C++,
thiscan be deduced, except when you have variable names that make it impossible to deduce. So you sometimes need it and sometimes don’t.I Python elects to make things like this explicit rather than based on a rule.
I Additionally, since nothing is implied or assumed, parts of the implementation are exposed.
self.__class__,self.__dict__and other “internal” structures are available in an obvious way.
by S. Lott]
The Emperor’s New Clothes
http://en.wikipedia.org/wiki/The_Emperor’s_New_Clothes
To my surprise a lot of people do not know about this story.