4 ms·
> But why can't the interpreter/compiler implicitly... "Explicit is better than implicit" -- PEP 20 Python was the first language I ever learned and I just to
by edavis 10y ago
> But why can't the interpreter/compiler implicitly...
"Explicit is better than implicit" -- PEP 20
Python was the first language I ever learned and I just took it for granted that you had to manually specify "self" like that. When I see code with implicit self, it reads strangely to me. Like, "Where does 'this' come from? Oh yeah."
- imtringued 10y agoIn a statically typed language you would have to constantly enter the type of the class as the first parameter.
- pmontra 10y agoOr to quote Matz "No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it's not perfect for you. The perfect language for Guido van Rossum is probably Python." My first serious language was C, which is way more lower level than Python. Still Python has something that reminds me of C. Those wierd __xyz__ methods, looking like what we used sometimes in #define; the useless : instead of some { (I know where the : comes from but it should be deprecated or made optional) and that self, which is the pointer to the C struct we were using to implement OOP in C. It's a strange mix of low and high level constructs, not fully OO and definitely not functional. Being at midway on many axis maybe it's the reason why it appeals so many people: it's a little bit familiar to everybody and this is important for the success of a language. Think of Elixir which was designed to look similar to Ruby, even if they have nothing in common.