Re:Show HN: Javalin, a Java/Kotlin REST API Framework
by paulddraper on Monday May 29, 2017 @09:42AM
(#14439043)
> the Java designers seem to have thought it was worth something, since Java has a somewhat similar feature: a method calling another method on the same object can leave out "this".
True, though the reason what that Java should be "familiar", so it did the same thing as C++.
IMO, Python did the right thing by not having magic variables.
Functional code + this starts getting messy, ala JS.
Python on the other hand doesn't have the implicit "this", so the JUnit API (the unittest module in Python) actually becomes uglier in Python. Instead of this in Java:
Python needs an explicit self variable: