|
|
|
|
|
by pansa2
1955 days ago
|
|
> JS or even Python (both were not OO in first version) This isn't true for Python. Quoting Guido: "classes were added late during Python’s first year of development at CWI, though well before the first public release" [0]. I don't think it's true for JS either - the first versions didn't have classes, but I believe they already had prototype-based OO. [0] http://python-history.blogspot.com/2009/02/adding-support-fo... |
|
I thought Python had classes in the first release but not to be used by library/application makers. But I was probably mistaken. Thanks for setting that straight.
What I think is rather unidiomatic in OO langs is Pythons "function/methods" like `len(x)` which is implemented as `__length__()`. This is just weird/unintuitive/unidiomatic OO... I do not know what Guido was on when he thought this was a good idea.