Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is basically how I use Python :) Truly, recently I tried to remember how to create a class method so that I can have different constructors and I forgot! Got back go just structures and functions.

Most OO in most OO languages is just polymorphism and inheritance is merely a roundabout way to construct or traverse the method graph for polymorphic objects. It's often much easier to do polymorphism directly and only if you really need it: quite often you can fare well without polymorphism at all and simply write branching instructions.

The useful OO must be about changing state in a controlled manner, but this remains largely unaddressed.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: