5 ms·
As decidely a non-insider, I'll tell you that, for me, Python's core strength is to be a beginner's all-purpose programming language, and not very much else. I
by tannhaeuser 6y ago
As decidely a non-insider, I'll tell you that, for me, Python's core strength is to be a beginner's all-purpose programming language, and not very much else. I had a really good experience in teaching Python to 8-10 year olds; actually, the kids were able to work out most things for themselves as I couldn't help all that much really, since I'm not much into Python. And in fact, Python was forked or at least inspired from/by ABC which was specifically designed to be a less idiosyncratic PL.
Fun fact: ABC was developed by Steven Pemberton (among others) who'd later led many W3C efforts, including the failed XHTML2 effort. I didn't get around to asking how he went from ABC to XForms (which is as idiosyncratic as it gets) when I saw him as a speaker a couple years ago ;) but anyway he's always been an inspiration.
- quietbritishjim 6y agoThat's a good use of Python, and if that's all it's useful for for you, that's fine. I'm not sure whether or not you're trying to argue that that is the only reaosnable use of Python? To me, it sound like you are. If so, that is contradicted by the many people who have successfully used Python for many other purposes. That includes run-once scripts (where you might have used Perl in the past) where run time speed is not as important as speed of writing the code, but also certain types of code running in production. Like any other tool, you have to be aware of its strengths and weaknesses: maybe it's not the best choice for a code base running into 10s of KLOC or more, or for doing CPU-intensive work that can't be vectorised (e.g. multiplying a few large matrices in numpy is fine, whereas multiplying an extremely large number of very small matrices is maybe not fine). The fact it has weaknesses doesn't mean it should be written off for all tasks, even those where the weaknesses aren't so important, especially when it has strengths too (e.g. if Python would do for a particular task then using C++ blindly because it's "better" would be wasting developer time for no reason). It's often used for glue code where all the work is actually done in C libraries like deep learning, and it works very well for that: if 0.1% of your runtime is spent in the top-level glue instead of 0.01%, that's probably not a problem. Also, this discussion is fairly off topic to begin with. The article really isn't about the strengths and weaknesses of the language. It's about what consitutes the language versus an implementation of it (CPython).
- tannhaeuser 6y agoI guess what I'm trying to say is that Python is fine as it is; I believe (relatively) recent additions such type annotations and chasing trends like async only serve to question Python's core strength. I know full well that Python is used a lot for "scripting" tasks (such as in yum/dnf and countless others), and has apparently a good standing in ML; in fact I'm using it daily (for example, I'm using BackInTime for backup). But whenever I come across eg. Python bindings in a package I want to compile, or Python used as part of a build step, I know I'm in for extra work since rarely does it work out of the box (relying on fragile "/usr/bin/env python" hashbangs, or having me to manoever around missing Python packages or versions, etc.). Saying this from the perspective of someone who has seen shell alternatives come and go, even Perl has, in practice, better backward-compat and has generally aged better. But yeah, it's offtopic I guess.
- greenshackle2 6y ago> chasing trends like async Python is fairly popular for web backends, given the ecosystem built around WSGI, I would say that's one of its core strength, so async makes obvious sense.
- VectorLock 6y agoPython does have some warts with like you said hashbangs but its still eons ahead of other similar languages in this regard (like Ruby) and that is a small thing to relegate it in your mind to a 'beginner only' language, since tons of other languages do things much worse than Python does. Python's simplicity - which makes it appealing for beginners - is its core strength that had made it so widely adopted for so many different things.
- 6gvONxR4sf7o 6y ago> That includes run-once scripts (where you might have used Perl in the past) I never learned perl, but nearly every time I try to do something complex in bash (more than a dozen lines or so containing control flow) I regret it and end up rewriting it in python. Then the next time comes around and I go "I really should get better at shell scripting, I'll do that," and bash my head against the wall for a while then end up going back to python again.
- miohtama 6y ago> and not very much else Companies whose success relied writing v1 in Python and still using Python - YouTube - Instagram - Pinterest - Dropbox
- oblio 6y agoThat's appeal to authority. The real question would be: would the people who wrote these apps and especially the people who maintain them, write these apps in Python if they had to do it again?
- rjkennedy98 6y ago> Python's core strength is to be a beginner's all-purpose programming language, and not very much else Wow - I do think that it's a great teaching language although this definition could apply to Java, JavaScript, PHP and others. But "and not very much else" seems to me to be a crazy limited view of Python. Many of the worlds most popular websites (including the one I work for) use Python successfully in production. It's also now become the standard language (replacing R) for doing data science and machine learning. I'm not in the science community, but my understanding is that is used heavily in scientific programming as well. I'm sure there are plenty of other use cases I haven't mentioned here.
- skohan 6y agoJust because a tool can be used for a given case does not mean it should be used. Python has a lot of drawbacks which make it a poor choice for use in production. Duck typing means many classes of errors which could be caught by a compiler will make it into production, necessitating much more rigorous testing process (i.e. developer time) Dependence on the system python interpreter and poor dependency management solutions make environment encapsulation at runtime a more serious problem in Python than other languages. Python performs poorly and uses lots of memory compared to other languages, making it an expensive choice to build an application on top of. Python's USP is that it has a shallow learning curve, which is why it has uptake in domains like science and ML which are populated by "non-programmers", but virtually every other property of the language makes it a poor choice for serious engineering work.
- wenc 6y ago> Python's core strength is to be a beginner's all-purpose programming language, and not very much else. I think you'll get a lot of pushback for this sentence; not the first clause, but the second, since it contradicts the lived experiences of many. But all sentiments come from somewhere. I'd be interested to understand how you arrived at that position?
- tannhaeuser 6y agoYeah sorry to Pythonistas. That wasn't good wording at all; what I meant was what language I'd personally consider for what kind of projects.
- wenc 6y agoThat's fair. Every language has different degrees of suitability to different problem domains.
- shpongled 6y agoIt's gonna be an unpopular opinion here I suppose, but I agree with you. The only times I ever find myself reaching for python are one-off scripts, and when I have a simple problem that can be solved in < 50 loc with some combination of pandas + numpy + matplotlib. It's a good language for gluing together libraries, but I would never pick it for anything involving "actual" programming.