4 ms·
> Python popularity is self re enforcing. It's popular because it's popular I'm sorry but that's just an incredibly ignorant take. Python revolutionized progra
by wraptile 2y ago
> Python popularity is self re enforcing. It's popular because it's popular
I'm sorry but that's just an incredibly ignorant take. Python revolutionized programming.
I was in Euro Python 2016 (or something) and Guido van Rossum (founder of the language) did a surprise visit and a line of people would form around him every now and then of people thanking him for making programming and development so thoughtful and accessible which changed people's lives. I was in the line too.
Python's approach to programming and the whole language design, community, enhancement proposals like PEP-8 and Python Foundation to this day is mostly unmatched. Python is absolutely brilliant!
- deleted 2y ago[deleted]
- moi2388 2y agoIt did, just imo not in a positive way. Not typesafe, everything is global, terrible syntax with significant white space, virtual environments hassle, very slow.. All it did was make people not have to think whilst programming leading to a whole bunch of terribly optimised one-shot scripts that have no business being in production
- otabdeveloper4 2y agoPython was originally a teaching programming language. You know, for kids and first-year students, as a replacement for BASIC. Now that we use it for building enterprise crap it has turned into some sort of lovecraftian rube goldberg machine, but around the Python 1.5 days it was, indeed, a nice and simple no-nonsense language.
- moi2388 2y agoIf it was used only as that, for perhaps the first introductory course, I think it’d be great. That’s exactly the scope it should be used in, and no further
- icedchai 2y agoHow do you feel about other scripting languages? Ruby? PHP? Perl?
- pjmlp 2y agoThey should be mostly used for scripting exactly, not full blow applications, unless a JIT is part of the story. Which incidentally, Facebook had to spend millions of dollars adding one into PHP, across multiple attempts. And Shoppify is doing the same to Ruby. Because as Facebook pointed out during their efforts, every single 1% performance improvement, represents millions of saved dollars in infrastructure costs.
- edanm 2y ago> Python was originally a teaching programming language. You know, for kids and first-year students, as a replacement for BASIC. Ummm, what? I don't think that's true.
- namaria 2y agoI'm with Dijkstra on this one. Teaching people these simplified languages full of magic and which encourage all sorts of bad design decisions by omission cripples their mind.
- edanm 2y agoIf you're referring to Python, I wouldn't call it simplified, and considering that it is one of the most used languages in real-world production code, then I definitely don't think there's any problem with teaching it. I also don't know the context of what Dijkstra said, but in general I think teaching people simplified things as a first step is often a great pedagogic method, so this sounds... wrong?
- namaria 2y agoI think there's a problem in starting with such languages. It fills the mind with vague and subtly wrong mental models that are hard to change. I know a lot of developers who can't see beyond the text box where they have to get some code to run and that's detrimental to them and to the industry. I believe that teaching should focus on fundamentals and how to compose them rather then straight to 'let's write some code in this box and get some magical results, you don't need to know more than that'.
- pjmlp 2y agoAnd with exception of 8 bit home computers, at least BASIC had compilers.
- dvdkon 2y agoI'll agree with you about the speed and type-safety, but I think the syntax is great, venvs are fine, and I don't understand your complaint that "everything is global". Python does have function-level variable scoping and one of the best module systems of its time. You could even argue that dynamic typing is better for Python's original ambitions (scripting), and now that it's used for more "serious" coding, Python's developers are doing the right thing by supporting gradual typing. On a more general level, I think all programming needn't be serious engineering work; there's room for quick scripts and end-user programming, which should be as easy as possible, robustness be damned.
- otherme123 2y agoWhat do you mean "everything is global"? You can't have scoped variables in Python?
- jononor 2y agoVariables are lexically scoped. Additionally, to _assign_ to an outer/global variable, one needs to use the nonlocal/global keyword. Otherwise one will get a new local variable. Variables in a module are also namespaced to that module. So I have no idea what the "everything is global" scope is about.
- Uptrenda 2y ago>Not type safe That's the point. Look up what duck typing means in Python. Your program is meant to throw exceptions if you pass in data that doesn't look and act how it needs to. This means that in Python you don't need to do defensive programming. It's not like in C where you spend many hundreds of lines safe-guarding buffer lengths, memory allocation, return codes, static type sizes, and so on. That means that Python code can really just look directly like the algorithms they need to implement. That makes Python genuinely shorter and more readable than almost every other language out there. >Everything is global Not really. Python passes basic types as a copy. This is 'pass by value.' Objects are passed as a 'reference' to an object. So you can change that named reference without effecting the object or you can use it to manipulate the item it points to. Your own classes, lists, and dicts fall under this category. But I don't think ints, strings, or bytes do. >virtual environments hassle Yeah, you're not wrong. pyenv doesn't work that well and installs often break when you try set it up. It's well worth getting it properly installed though. I mostly just test from Python 3.6 (the version that introduced asyncio) and the scattering of major versions between it. I also test on all major operating systems using esxi by vmware. >very slow. This is mostly a meme. If you're doing CPU-bound work where each instruction counts then there are ways to tune Python performance. There's https://numba.pydata.org/ https://numba.pydata.org/ and https://cython.org/ https://cython.org/ 'easily tune readable Python code into plain C performance by adding static type declarations, also in Python syntax.' Python can use multiple processes, multiple interpreters, and soon 'real threads.' I should add that a lot of algorithms aren't parallel so they're not likely to benefit from such improvements. But Python byte code already is quite fast as it is. As for 'data processing' -- if the work-load is I/O bound its not going to matter if you use Python or C. It will be just as fast.
- pansa2 2y ago> But I don't think ints, strings, or bytes do Everything in CPython is pass-by-reference. But there's no difference between that and pass-by-value for types like `int` and `str` because they're immutable.
- icedchai 2y agoIt's still perfectly fine for many use cases. You see terrible code in every language, but that's more about undisciplined developers. Python does make it easier due to its accessibility. That can also be a good thing. Many people would've never started programming if it weren't for Python.
- wraptile 2y agoI don't know who hurt you but you should really actually try learning python because all of your points here are ranging from non-nonsensical to out right wrong.
- pjmlp 2y agoBASIC revolutionized programming. At least BASIC started as compiled language, despite being dynamic. Interpreters were mostly a thing on the memory constrained 8 bit home computers. 60 years ago!