4 ms·
Sorry, that discussion is so overrated and elitist. I'll never understand people complaining about one technology/language/tool that made it possible to dozens
by boredemployee 4y ago
Sorry, that discussion is so overrated and elitist. I'll never understand people complaining about one technology/language/tool that made it possible to dozens of people to join to the - once restrict - small club which was computer science and which is now making it possible to a lot of people to get a job with an easy to learn and less verbose language. One can argue about speed/memory/better languages out there to make data science (hello Julia) but that's just how the world out there works. Python has a great/dope community that I didn't find when I worked with C back in the day, for example.
- boberoni 4y ago> Python has a great/dope community Python's community is one of the greatest and worst parts of the language. Python might not be the best language for anything, but it's the second best language for everything. I've dabbled in many programming languages, a lot of which are backed by a single large company or consultancy: - Java (Oracle, at least initially) - TypeScript, C# (Microsoft) - Golang, Dart (Google) - Elixir (Nubank) - Clojure (Cognitect) - Kotlin (JetBrains) - Objective-C, Swift (Apple) - Julia (Julia Computing) Then, there are languages like Python, Ruby, JavaScript, PHP, Rust, etc. that are more diversified and distributed in terms of core contributors, maintainers, and evangelists. Meanwhile, there's a long list of other lesser known languages that have failed to grow a community as large as Python's. As I get older and older, I have realized that our programming languages are not static entities, but they change and evolve over time. They are influenced by users, companies, and researchers. I hope that one day, there's a humanities subject that studies programming languages just like we study natural languages like in linguistics. The closest thing right now seems to be history of science, but it's quite a broad field.
- z9znz 4y ago> Python's community is one of the greatest and worst parts of the language. If you come from a Ruby background, and you are now doing Python, you may find yourself on Stackoverflow looking up how to do X idomatically in Python (something you did all the time in Ruby). Or you may ask colleagues who know Python but do not know Ruby. A common answer from the Pythonista community is, "Why would you ever want to do that?" (or Why would you need that?) Ternary operators? Who needs that. Ok sure, here, but let's make it awkward. Where did Python get the model to do "x = 1 if y else 2"? But ironically, unlike Ruby where you can say "x = 1 if y", in Python you cannot do that. Oh, but you cannot say "x = 1 if y else return". That's not allowed. Python has finally, as of 3.10, added a switch statement. This is something that many other languages have had for ages. You should see the contortions people have gone to to approximate a switch statement in Python... https://stackoverflow.com/questions/60208/replacements-for-switch-statement-in-python https://stackoverflow.com/questions/60208/replacements-for-s... The Python community may have some good, helpful, and friendly people; but most programming communities have that. That is not a plus for any language, because it should be a given.
- nemothekid 4y agoI'm not a Pythonista by any means, but these complaints are banal. Ternary operators? Plenty of new popular languages don't have a ternery operator (Go, Rust, Elixir, Kotlin, Nim). My list of python gripes are long, but language constructs are not on the list.
- z9znz 4y agoThe point is about inconsistency. You can say "x = 1 if expr else 2", but you cannot say "x = 1 if expr". You do a two line if expr: x = 1 You cannot say "x = 1 if expr else return". [1] is a list with one item, 1. {1} is a set with one item, 1. (1) is a number, 1, with pointless parenthesis. Perhaps you mean (1,), a tuple containing only one value. Or how about mutable default values in function paramters? That makes a lot of sense... I don't need to keep offering examples. You can search the internet and find many places where people list the warts, inconsistencies, and misfeatures of Python.
- pbourke 4y agoThese are pointless nitpicks. Every language has things like this. In 4 years of using Python in anger I’ve never written a line of code that could be improved by the features you list.
- z9znz 4y ago> These are pointless nitpicks. Every language has things like this. In 4 years of using Python in anger I’ve never written a line of code that could be improved by the features you list. This is exactly the kind of response one often hears from the Python community. Translated it means, "I'm ok with it this way, so who cares if it could be better?"
- nickles 4y ago> You can say "x = 1 if expr else 2", but you cannot say "x = 1 if expr". You do a two line This one liner works: if expr: x = 1 > Or how about mutable default values in function paramters? That makes a lot of sense... This can be helpful under certain circumstances (e.g. memoization) [1]. The linked article also points out that it can be useful for rebinding global names in optimized code. [0] https://stackoverflow.com/a/1145781 https://stackoverflow.com/a/1145781 [1] https://web.archive.org/web/20200221224620id_/http://effbot.org/zone/default-values.htm https://web.archive.org/web/20200221224620id_/http://effbot....
- kaba0 4y agoJava is one of the few languages that actually has a specification and multiple, very different implementations. So I don't believe it is fair to call out it as being backed by a single company (even though in practise Oracle is indeed the one doing the most work on the platform, and they are doing a spectacular work at that). Even if Oracle would disappear tomorrow, Java has enough usage by many huge companies that the platform wouldn't even skip a beat.
- z9znz 4y agoUse any language you like to build a proof of concept. But one you need to take that POC and build a real product which needs to be supported, extended, and maintained, then you must choose tools which fit that long term need. Many of use first experienced school in kindergarten. Kindergarten was an important step in our education and socialization. But we didn't refuse to move on to the next level, no matter how much fun it was or how nice our teachers were. Maybe some people felt unsure about leaving their comfort zone, but there's no progress without risk and effort. Is a university student elitist because they know something a kindergarten kid doesn't? Should they stop trying to promote continued growth through the educational levels? If you were to use production Python on any decent sized project, and you had also used Ruby (just one example... some other languages can be even more succinct), then you would hate Python.
- coderenegade 4y agoThe issue with a lot of the gripes with Python is that there's no other language that combines mature linear algebra libraries, scientific computing libraries, and industry standard computer vision libraries with easy to use basic tools like csv reading, dataframes, json parsing, etc., while also providing easy syntax and fast iteration time. I work in C++ and Python, and things that are completely trivial in Python have a lead time measured in days, if not weeks when moving to C++. This is before even getting into the weeds of writing bug-free C++ code; you need to be familiar with the nitty-gritty details of the library you're working with, because things you might take for granted may not work the way you think. Sure, maybe we should be rewriting POC code in a language that's more fit-for-purpose if we're talking about a large project, but for that you need mature libraries, or a team with some fairly serious chops (i.e. decent math background, senior coders, expensive to hire, and hard to replace). There's a lot to be said for a language that makes it easy to be productive on technically demanding problems, while also making it easy to find new talent. As someone who's written code relying on linear algebra and CV in Rust and C#, and I'd honestly pick Python every time for those types of jobs. It's not perfect, but that's not the benchmark.
- z9znz 4y agoI would not advocate for rewriting everything in non-Python. It is what it is, and it excels at tasks related to the important libraries discussed in this topic. Just as Python wraps the libraries which do the heavy lifting in C, I would try to keep the Python wrapper as minimal as possible and stick some interface in front of that. Instead what happens often is people choose to either build more and more around this important stuff, staying with Python, or they say, "We're better off just supporting one language in-house, and Python is required already; so we are a Python shop."