9 ms·
The part that Python really bothers me, as someone who had write Python for almost 10 years, and right now doing it professionally, though personally I don't co
by xxxpupugo 7y ago
The part that Python really bothers me, as someone who had write Python for almost 10 years, and right now doing it professionally, though personally I don't consider myself a Python developer rather than a Python senior user, is actually obvious to nail down, and frustratingly, difficult to handle.
SLOW. The sin of all. I don't want to make other arguments with people who just come to repeat 'Oh you can make it fast, you are doing it the wrong way'. Sorry, I have heard that 100 times, now is sounds like bug-as-feature excuse to me.
Sorry, but Python is just slow. All the stuff people might bring up is just trying everything to bypass Python itself. Multiprocessing is hell to work with, buggy and unpredictable. Cython is OK but it is not Python.
Python's slowness is like cancer, and terminally so. Down deep, it is because its overtly flexible/loose type system, the never-going-away GIL, and prematurely exposing of C-API makes it almost impossible to optimize without breaking the existing compatibility.
And most importantly, I don't think it is solvable, truth is the patches are so integrated, people already forget what problem they tried to fix in the first place and just live with it.
But it will haunt Python in long term though, people will be struggling with Python in performant production until they start reimagining a world that without Python. Maybe a better Python in that sense.
- metroholografix 7y agoSame here. I've used Python daily or almost daily for the last ~10 years (thankfully I've used other languages too). I've architected reliable systems on top of it but it was obvious to me almost from the get-go that Python is a terrible language. I credit my previous years of programming in Lisp that trained my mind to see through the Python mirage. One issue is that veneer of Python user friendliness that lures people, usually those who are new to programming or don't have extensive experience with _multiple_ languages, in. The major issue for me is that Python lacks internal consistency and is based on a inverted-design (meaning, no design really) that accumulated over the years and stinks. This makes it really easy for people to use Python and write unmaintenable code but also very hard for them to find out how to write good code. The hallmark of a terrible language is making good code hard to write. As far as specifics, I think the module system is a joke, the packaging even worse, the REPL is not really a REPL (in the Lisp sense), ctypes is bad and has 100 different ways you can hang yourself with, there are tons of gotchas in the language and standard library that if you haven't memorized [usually by running into them], they will bite you hard, the GIL ties my hands, iterator/generator obsession makes for really bad code messes if people take it seriously and start poorly designing their APIs around it, absence of proper lexical scope, statements are not expressions and led to gross hacks like PEP 572... I could keep going for days. Python is really the PHP of the 2010 generation.
- odonnellryan 7y agoI honestly think you've just worked on bad projects. Python isn't the perfect language but the quality of the available libraries makes it awesome. The individual quality of projects in any language will always vary.
- metroholografix 7y agoMy criticism is mostly aimed at the language (and its standard library) itself. The major projects I worked on, I architected from the beginning. It is when designing and architecting reliable systems that Python's terrible nature hits you in the face, especially if you're used to better languages. Take the nonsensical but alluring Python motto "There should be one -- and preferably only one -- obvious way to do it." Assuming this was even true, which it isn't as a series of Python debacles - by its designers no less - over the years has proven, I don't want a language that shoehorns my thinking into "one"-ness. One-ness doesn't solve hard problems. I want modeling flexibility, the ability to examine a problem from multiple perspectives and explore the solution space in-parallel from multiple angles of attack. C and C++, bad as they are, let you do this. Perl lets you do that. Common Lisp is the best language I know on that front, it is _designed_ to let you do this. I'm not going to say that Python is outright hostile to that mode of working, but it's not designed to bend / be stretched or mold with your mind in the same way that great languages are. Sooner (if you're solving fuzzy problems) or later , you'll run into its limitations and then you can't help but think that you're wasting your time.
- qwsxyh 7y ago> I don't want a language that shoehorns my thinking into "one"-ness. Reworrded for you: > I don't like Python because I don't like Python
- odonnellryan 7y agoDon't get me wrong, it is obviously your right to dislike a language. I've designed plenty of reliable systems in Python without much issues whatsoever with making them reliable. I have had some problems with code organization over the years (Python certainly lets you "do your own thing" which can lead to issues with organization over time) however I haven't had reliability, stability, or speed issues for 95% of the problems I've worked on. Only times I've ever personally needed a faster language - when submitting problems in Python to online courses (algo). Then I used C#. Whatever, not a big deal :) Python says the goal is to have "one right way" to do things, but certainly there are many, many ways to do any of those things. > I want modeling flexibility, the ability to examine a problem from multiple perspectives and explore the solution space in-parallel from multiple angles of attack. Can you give an example of where Python doesn't allow you to do this? I've never had this issue. Actually the opposite: mocking solutions are extremely easy with Python IMO and the tooling available (even the uber-free stuff) is awesome and easy to debug with (much easier than using Visual Studio for example - not saying VS is a bad app, it is great).