8 ms·
The more I use Python the more I hate it. It’s genuinely a bad language, with a stellar ecosystem. Ironically, the most valuable parts of the ecosystem are ofte
by forrestthewoods 5y ago
The more I use Python the more I hate it. It’s genuinely a bad language, with a stellar ecosystem. Ironically, the most valuable parts of the ecosystem are often written in C (NumPy).
It’d be interesting to see how much of the Python ecosystem is actually necessary to move PyTorch to a better language.
I’m afraid we’re stuck with Python for the next 20 years. That makes me very, very sad.
- amelius 5y agoSomeone wanting to promote a new language could wrap Python as a growth hack.
- patagurbon 5y agoJulia has a package that does this fairly elegantly (not perfect of course, but you can wrap on top of this) https://github.com/JuliaPy/PyCall.jl https://github.com/JuliaPy/PyCall.jl.
- jshen 5y ago100% this. I wish it weren’t so.
- noitpmeder 5y agoWhat do you think the major drawbacks are? Speed would be the top of my list, but most projects to not need anything more than what python can currently pump out.
- forrestthewoods 5y agoBasically everything. If I had to pick two things I hate the most it would be dynamic typing and Python's deployment story. I wrote a somewhat tongue-in-cheek rant blog post. https://www.forrestthewoods.com/blog/things-i-like-about-python/ https://www.forrestthewoods.com/blog/things-i-like-about-pyt...
- Tsarbomb 5y agoAside from speed, one thing that really eats at me is that it makes any sort of functional programming overly verbose, unfun, and just not very idiomatic. Also the the vast majority of python programmers simply don't understand the best practices in their own ecosystem. I was recently writing code using Reactor/RxJava in Java 11 w/ Lombok. I don't think I've ever been so productive or lead a team as productive as when we were going ham on the functional/reactive Java. Now that I'm back in Python land, I am constantly frustrate on a daily basis with both the language and the runtime at every turn. Even with the asyncio we are working on, it feels like the absolute minimum viable product when compared to the java, node, or rust I have done. There are some fantastic python enhancements that bridge some of the gaps like PEP 484 (Type Hints) and PEP 517 (holy crap an actual build systems that are not dogcrap) but it feels like the python community does not care.
- jimsimmons 5y agoNever seen Python described as verbose. Rx has libraries in Python libraries. If you think scientific programmers give a damn about build systems you don’t know what you’re talking about
- dnautics 5y agoYou can't dismiss the fact that hiring python is hard. You think you're getting a good programmer, because they know all the leetcode tricks, but that person turns out to be a dud.
- edgyquant 5y agoCan you elaborate? If someone can pump out leet code I would assume they would be a half decent programmer and it would just take some time for them to be as productive as you wanted. Then again I’m mostly self taught and never done leet code and I still manage to be a good programmer according to those I’ve worked with
- dnautics 5y agoI personally think that leetcode-interview-passers that I have had to work with do poorly with actually useful tasks like, writing organized code, writing tests, documenting, etc.
- edgyquant 5y agoProbably but those are things they can pick up on the job pretty quick, while it’s a lot harder to teach leet code style problem solving while solving actual business problems.
- dnautics 5y agoMaybe you have a different experience, but none of the actual business problems I deal with are leet-code style. Then again, I have recently stopped calling myself a software developer (and have long since stopped calling myself a software engineer) in favor of the more accurate "software plumber". But I imagine, even coding tasks that require algorithmic knowledge and insight, are benefitted from well-organized and well-designed code. Doing that correctly is often a matter of insight and judgement, and I think often those are not "easily learned".
- jreese 5y ago
- justapassenger 5y agoBad languages like Python, JavaScript, PHP are responsible for powering large part of tech revolution. Ability to write bad code easily is IMO large part of why they’re so popular. Low barrier to entry helps to build huge ecosystem.
- dnautics 5y agoSure, but I get the feeling that the pendulum is swinging from a period where being able to write code easily is relatively devalued to being able to read code easily. Ironically, python itself benefitted from the last swing of that pendulum, as it was widely regarded as an "easier to read" PL than, say C (well, yeah) or perl (well, super yeah) or PHP (super-duper yeah).
- forrestthewoods 5y agoI would claim the tech revolution happened despite those terrible languages rather than because of them. The languages are popular because of inertia, not because they're good. Python is popular because of the ML revolution. If ML didn't take off neither would Python's popularity. Is ML successful because of Python or despite Python? Well, the world is probably further along with Python than if it merely didn't exist. But if a different language that sucked less existed we would, imho, be further along than we are. I'm not annoyed Python exists. I'm annoyed that its inertia is so monumental it's inhibiting further progress. We're at a local maximum and the cost to take the next step is really really really high. That's not Python's fault mind you, just the way things work.
- deleted 5y ago[deleted]
- edgyquant 5y agoNo these languages are the drivers of the tech revolution. PHP was widely adopted because it allowed people to rapidly build personal websites and then those people went on to build companies with it. Python is popular in ML because of its syntax being close to pseudo-code and allowing people who aren’t programmers to interact with all the old math libraries you used to have write C and Fortran to use. JavaScript is popular because it made the web more interactive and thus a ton of people who made websites learned it as their first programming language when they were young. Python and PHP are so big because of the languages themselves and their implementation, Js is a bit different in that regard I’ll admit.
- hpcjoe 5y agoThis is one of the nicer aspects of Julia. It starts out being a great language to work in. Its easy to implement algorithms that are generally difficult in other languages. Its important to remember that most of the python ecosystem, isn't written in python. The functions are often thin wrappers/objects around the real computation, which is often written in a faster language, C/C++/Fortran. Julia excels in composability, performance, ease of development. You don't need to recode your algorithms in another language due to the performance of Julia, as is needed in Python's case. Generally speaking, I see Julia's biggest fault, time to first plot, being addressed far sooner than python being redesigned to have Julia's capabilities. For the record, I use python daily in the day job. And I use Julia there for analytics there, often with jupyter notebooks. Easy for users to consume and interact with.
- laichzeit0 5y agoLet’s not ignore the giant elephant in the room: 1-based indexing. I don’t particularly care since I use R and Python but Java, C, C/C++, C# all used 0-based indexing. It’s truly a bizarre choice Julia made there.
- freemint 5y agoYou can turn any 1 based array into a 0 based array using a wrapper type that just gets inlined away. Also have a look at https://github.com/giordano/StarWarsArrays.jl https://github.com/giordano/StarWarsArrays.jl
- cookieater 5y agoMose Giordano hit the nail on the head with this one. Who cares about 1 vs 0 based indices? If anything its a silly and minor design decision. I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array.
- hpcjoe 5y ago> I worry about someones ability to solve real problems in any language if they can't get their head around an +1/-1 when indexing into an array. This. Think about what this signals to employers and interviewers if someone throws a hissyfit over this.
- dagmx 5y agoI don't think Python is a bad language, it just often gets used where it shouldn't. Python is one of the few languages that has a balance of ease of use, ecosystem, ubiquity, and useable type system. It's a fantastic glue language and it's extremely flexible.
- edgyquant 5y agoPython is not a bad language, programming languages do not have to be unreadable or have a steep learning curve to be good. The problem with python is that it’s implementation is slow and offers a ton of hang ups that you have to know the language in and out to even know they’re there. There’s a post here about once a year that details some of the funnier things.
- faizshah 5y agoI have had the opposite experience with python, the more I use it and learn the standard library and ecosystem the more I love it. What exactly makes you think its a bad language? For me I think the packaging ecosystem is bad, we need one package management tool like poetry built in. We need a built in typing system like typescript. Lastly we need to remove the GIL. I’m pretty sure all of these are currently being addressed by the community. I switch languages a lot and things like functools, itertools, dunder methods, list comprehensions, dict comprehensions are things I sorely miss especially in typescript. In particular list and dict comprehensions when used with care are a great deal easier to work with and reason about when transforming data.
- forrestthewoods 5y agoI'd be moderately happy with Python if it had full static typing, improved error handling, fixed packaging, fixed deployment, and removed the GIL. I like to think that containers only exist because deploying a Python application is so %^#(&*# complicated that the easiest way to do is to deploy an entire runtime image. It's an absolute nightmare and travesty. So bad. So very very bad. https://xkcd.com/1987/ https://xkcd.com/1987/ I'm not optimistic on TypeScript for Python. That'd be great if such a thing existed! I'm not optimistic on packaging or deployment. There is recent progress on GIL removal which is exciting! There is hope, but I'm proceeding with very cautious optimism. Comprehensions are kinda great, but also hideous and backwards. Rust iterators are a significant improvement imho. The fact that no recent languages have chosen to copy Python's syntax for comprehensions is telling! Oh, and I think the standard library API design is pretty poor. Filesystem has caused me immense pain and suffering. Runtime errors are the worst.
- jolux 5y ago> I'm not optimistic on TypeScript for Python. That'd be great if such a thing existed MyPy exists, Python officially supports type annotations. I do think comprehensions are a weird feature for Python, particularly from the “one way to do it” perspective. And also because the language so strongly discourages FP patterns outside of comprehensions. Overall I would say the language is a lot better than the ecosystem, and that it suffers a lot from having a bad packaging design. I’m not a fan, suffice it to say. It’s best if you can stick to the standard library.