r/Python • • May 26 '14

Python 3 is killing Python

https://medium.com/@deliciousrobots/5d2ad703365d/
0 Upvotes

147 comments sorted by

View all comments

8

u/jm_ May 26 '14

It's not like there are alternatives. Don't even mention Golang - it's a piece of dried up crap with arbitrary limitations (error handling from the 90ties, no ability to implement datastructures with native api, no operator overloading). Might as well use Pascal ...

It seems to me that just few bratty library developers (shamed by their users into fixing their shit to support Python 3) are the main detractors.

Now start downvoting ... cause we all love Armin and his unconstructive bitching.

5

u/djimbob May 26 '14 edited May 26 '14

go isn't a drop-in replacement for python, but its a well designed, easy-to-read statically typed language with good well-written libraries. It serves a different purpose. (Granted obviously python has many more libraries having a 10+ year head start).

Go misses some nice features (e.g., generics, operator overloading), but granted go was publicly released ~3 years ago -- give it time (python 2.0 didn't have bools, sets, new-style (object derived) classes, decorators, generators and iterators, with statement, nested scopes (beyond two nestings), automatic casting of 32-bit int to arbitrary sized int, etc). Once you get used to it, I really like the panic / recover and explicitness checking for errors. It's a different mindset, but actually works really nice.

Not sure what your "no ability to implement data-structures". Are you talking about how make only works on slice, map, chan? This isn't really a limitation, you can easily build on top of those structures; e.g., create a set out of map (go's equivalent to a dict) with values that are zero-byte struct. Yes, python has an underlying C API that you are encouraged to use as python2 would otherwise be unusably slow. As go doesn't have that huge speed difference it would be a bad idea to encourage writing things in a C API on top of go. Granted there still is the cgo if you need to call C library/function from within go, and IMO it is much easier to deal with than python C API (by nature of go being statically typed).