4 ms·
I'm surprised people needed to ask, and I was very specifically talking about the language itself rather than the libraries (so "batteries included" is not a co
by tragomaskhalos 8y ago
I'm surprised people needed to ask, and I was very specifically talking about the language itself rather than the libraries (so "batteries included" is not a counterargument); but here is a small non-exhaustive assortment of nonsense in Python:
1. Does 3/2 == 1 or 1.5 ?
Either answer would be logical and OK, provided you stick to it. The utterly daft answer that Python gives is "it depends on what version of the language you are using, and/or whether you do "from __future__ import division""
2. Generalising 1, a painful set of breaking changes between 2 and 3 that could have largely been avoided by aliasing names or introducing new names for changed concepts / methods; eg make xrange = range; add a new function rather that redefine what 'print' is (and yes, failing to make 'print' a function in the first place was a shockingly bad decision). Read about the insane amout of effort that Dropbox put into migrating their codebase to see what a ballsup this all is - polite languages respect backwards compatibility.
3. The object system is a mess: type(some_obj_i_made) is <type 'instance'> - wat? - unless you explicitly inherit your class from object when it suddenly does something sensible; constructor inheritance is a confusing bog. Yes yes old style vs new style objects, but that's the problem. This stuff shouldn't be hard; see eg Ruby.
4. edit: scoping - oy vey
Look, it's OK. It works. The ecosystem makes up for an awful lot of this rubbish. But don't be so devoted to a technology that you're blind to its faults.