4 ms·
> JavaScript uses this Python goes one further and requires you explicitly name your this (commonly self) as a parameter. Which is one thing I particularly lik
by eyelidlessness 5y ago
> JavaScript uses this
Python goes one further and requires you explicitly name your this (commonly self) as a parameter. Which is one thing I particularly like about Python, as it’s clear class instance methods are just sugar over plain functions/routines without any magic.
I find the Java-style name resolution that doesn’t require qualification utterly confusing. It would be especially weird/probably a footgun in a JS-like language where functions are frequently used as values and where their names can be shadowed locally.