8 ms·
My startup has built our entire system around Python and I have found it a lovely language to code in but a challenging language to deploy in practice, mainly f
by dmbaggett 14y ago
My startup has built our entire system around Python and I have found it a lovely language to code in but a challenging language to deploy in practice, mainly for these reasons:
1) Python 3's backward incompatibility has made a mess of library support and has trapped us on Python 2.7.
2) memory usage is a problem on mobile for nontrivial Python programs; iOS isn't even a formally supported target.
3) Pythonic programs can't use multiple cores.
Now before you jump down my throat and tell me how bad a programmer I must be, etc, etc, let me provide some anticipatory clarifying comments:
1) Most libraries do now work in Python 3.3; we are waiting on gevent, pyasn1, and tlslite, and, of course, all our own stuff.
2) There's at least one fork of Python 3 on bitbucket with a bunch of promising memory-reducing changes (can't find it now).
3) Yes, I know about (multi)processing and that real threads are hard to work with.
Literally every few weeks we are confronted with a new problem caused by one of the above. The latest one: there is no WinRT port of Python yet, and the one Martin Loewis is working on is for Python 3.3. (Of course: Python 2.7 is barred from noncritical patches.) So we need to either make 2.7 work on WinRT or not ship a WinRT version. Windows 8 launches Oct 26; Python is frankly just not ready, and no one but Martin L and a few others seem to care (or even notice). (And yes, I know Win32 stuff still runs under Windows 8... but not on the ARM devices, and not in the UI-formerly-known-as-Metro.)
I wouldn't say I regret having chosen Python as the basis of a 250k-line system, because in retrospect it was still the best of the dynamic language choices. But I definitely feel like Python qua programming language has become a missed opportunity in many ways.
Nowadays if someone were to ask me what they should write a nontrivial new system in, I would probably recommend coding everything in JavaScript or C++11. This makes me sad, because Python's syntax and sensibility are unparalleled; I have never been as productive a coder as I have been coding in Python these last few years. And I've been coding in C dialects since, seriously, 1979 (on a Heathkit H89 with 64K of RAM!)
- briancurtin 14y ago> Windows 8 launches Oct 26; Python is frankly just not ready, and no one but Martin L and a few others seem to care (or even notice). Part of the problem is that you could count on one hand the number of contributors who have worked on non-trivial Windows issues in CPython in the last 12 months (probably even 24). I think we're pretty aware of this, but there are still only 24 hours in a day. In fact, my new SSD should be arriving today to complete the build of my new machine, and Martin's work on WinRT probably jumps ahead on my todo list.
- saurik 14y agoThis lack of contributors would not have been as a serious problem without the insistence to break backwards compatibility and fork efforts for five (and counting) years: it sounds like the work got done, it is just for the "wrong version" (the one few people can use) of Python.
- cdavid 14y agoI don't think the main issue from OP is that WinRT support is not ready yet: windows 8 is not even out yet. The fact that he will have to migrate to python 3 to get there seems to be the main issue.
- briancurtin 14y agoCorrect that it's not the main issue, which is why I quoted the part I was responding to...
- dmbaggett 14y agoSweet! Thanks to both of you for your WinRT porting work. Agreed about the duration of the day. :)
- dochtman 14y agoYeah, I think the "no new features in 2.7.1+" has been making Python less exciting to use for the past few years, as libraries have slowly started to support Python 3. I think the future might feel less bleak once Python 3 becomes a better option in deployment. As for the original article, I don't mind if Python's future isn't everywhere, but I find it sad that modern languages like Go and Rust don't copy more of Python's features (and my top contender for this is actually significant whitespace, because I find it greatly helps readability).
- rbanffy 14y ago> "no new features in 2.7" has been making Python less exciting Erm... Not exactly. http://docs.python.org/whatsnew/2.7.html http://docs.python.org/whatsnew/2.7.html "To help with porting to Python 3, several new features from the Python 3.x series have been included in 2.7"
- dochtman 14y agoErr, yeah. I mean in 2.7, as in, 2.7.1+. I've updated my post to make that more clear.
- dalke 14y agoHasn't that generally been the case? That is, Python 2.6.1 "is the first bugfix release of Python 2.6. Python 2.6 is now in bugfix-only mode; no new features are being added." So there's nothing new about 2.7.1 being only a bugfix release.
- nilsbunger 14y agoThere will be no python 2.8. Ref: http://www.python.org/dev/peps/pep-0404/ http://www.python.org/dev/peps/pep-0404/
- dalke 14y agoHmm. I think I misread things. I thought the author was saying that 2.7.x is a problem because 2.7.x are bug fixes-only. I now see I could have read that as there will be no features added, starting with 2.7.
- HorizonXP 14y agoI would just like to make people aware that there is one mobile platform that does ship with Python support: BlackBerry 10 and the BlackBerry PlayBook. It ships with Python 3.2 on device, and it can be used to develop actual apps with. Games are possible too, I know someone working on one right now. You should check out our project's site at http://blackberry-py.microcode.ca/ http://blackberry-py.microcode.ca/. I'm one of the lead contributors, and the project is still very much in its infancy. I'm actually in San Jose right now for the BlackBerry Jam Americas conference if you'd like to meet up and discuss more.
- anacrolix 14y agoBlackberry?! You must be joking.
- phren0logy 14y agoTell the other two people there we said hi. OK, that's mean, but seriously the installed base of BlackBerry doesn't really inspire confidence.
- zokier 14y agoSymbian and Maemo/Meego also supported Python. I remember having Python interpreter on my 2005 vintage phone :)
- TylerE 14y agoI realize this is going to be an unpopular opinion, but I think that for the long term sake of the language, the 3.x schism was bad, and will ultimately be regarded as a big mistake. In the time the community has spent dealing with/bickering about the transition, other languages have continued to forge ahead, while python just hasn't kept pace. It hurts me to say that - I like python a lot, but lately it just doesn't seem to have it's mojo.
- gaius 14y agoMy friend, we are still a looooong way from the Perl 5/6 debacle! What language doesn't hit a few stumbling blocks?
- saurik 14y agoPerl 6 and Perl 5 can at least be considered separate languages and separate ecosystems: Perl 5 is still under active development, not just for maintenance but for purposes of getting new language features. It is somewhat confusing that these two languages differ by a number and not by name, but the intention is somewhat clear. In the case of Python, they seriously seem to believe that everyone is going to "upgrade".
- kamaal 14y agoThe other thing about Perl 5 and Perl 6, is the backwards incompatibility gap is way large. And Perl 6 is designed such that Perl 16 shouldn't be necessary. You can't really say the same thing about Python. If Python wants to remain in the game, I don't see how they can do it unless they are OK breaking backwards compatibility in another 6 years. Python broke backwards compatibility for as simple a thing like a print statement. Nobody like to play stupid expensive migration games just because your language designer decided that print statement must be written a different way.
- zokier 14y ago> Python broke backwards compatibility for as simple a thing like a print statement. Nobody like to play stupid expensive migration games just because your language designer decided that print statement must be written a different way. That is a silly argument. They didn't break compatibility because they wanted to change the way print is. They changed the print because they already had decided to break compatibility. Ie "lets break compatibility to change print" vs "while we are breaking stuff, lets fix the print too"
- chubot 14y agoWhy do you even try to ship on Python 3? Python 2.7 is far from old. You don't have to use the latest of everything. I've been using Python for almost 10 years, and mostly I've pretended that Python 3 doesn't exist so far :) That simplifies life in many ways. I had no idea that people even ran Python on iOS, but if so it's cool that it even works! It's not true that Pythonic programs can't use multiple cores. In many programs a lot of time is spent in C extensions (i.e. half the stdlib), where the GIL is released, so you can run in parallel fine in that case. Not to say you won't be bottlenecked, but don't write it off so quickly.
- dmbaggett 14y agoTwo reasons: 1) New ports (e.g., WinRT) are all going to be Python 3.X 2) All improvements (performance, memory size) are going in Python 3.X Overall, Python 2.7 certainly works. But it's a wasting asset, and so is any codebase stuck on it.