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

It’s beginner friendly because of the magic and visuals.

When dealing with beginners, a strict indents policy makes sense.

Also the standard data model - makes tons of sense as a way to introduce to OOP.



Self is a little beginner-unfriendly if they have exposure to other OO languages. In fact the OO model in Python, aside from inheritance/polymorphism, IMO provides a rather uncompelling story for why you should use it other than just naked data structures, because its implementation is too close to a dict, and it doesn't offer you good compile time/type checks (or if it does, it's not readily apparent how to take advantage of them) which will lead a beginner to lots of AttributeError


"self" was what made it finally click for me that methods are just functions that take a copy of the data structure they're operating on.

Java's "this" is just kind of implicit magic in comparison, and it didn't accomplish the same understanding.


You should check out Go.


I saw a meme that was “what if everything was x” for each programming language. For Python it was “what I’d everything was a hash.”




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

Search: