Hacker News new | ask | show | jobs
by ant6n 1269 days ago
Yeah. And I don’t want confusing initialisers or constructors or whatchamacallit, and weird calls to super, and underscore methods. Maybe the language should just be minimally aware of classes and how they work, and build that into the semantics of the language using keywords, rather than giving me building blocks that make it feel like I’m rebuilding class semantics from scratch. It’s like when it comes to classes, Java is cleaner and simpler than python. Which is weird, cuz python is simpler and more fun to work with on all other fronts (well, almost, concurrency and threading is also kind of easier in Java).

…I really like python, but man it’s warts are annoying.

1 comments

When I first started using python (somewhere before the 2to3 migration) I was extremely pissed at the object layer.

I hate redundancy and the dunder and explicit self parameters completely stupid. With time I just got used to them .. (thanks partly to editor templates). The private field shenaningans weren't sexy either..

Other than that I agree.. it would be worth a python4

   class Foo(Bar):

      new(*a, **kw):
         "keyword: new"
         super(*a, **kw)
         print('v4')
      
      bar(a,b,adjust=1):
         "no self, shorthand super.parent_method()"
         return super.bar(a, b) + adjust
come on guido ;)
I'd wish there to be simply keywords that define public/private class/instance methods and variables.