Live data from Hacker News

Python Is Eating the World

zdnet.com

691–700 of 993 posts

Re: Python Is Eating the World

#691

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then. I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were? In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error,…

> In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string.

The creator of a well-known alternative to Python has a single-letter email address, and regularly receives email generated by Python scripts with this exact bug (which means instead of sending an email to "user", sends an email to "u", "s", "e", and "r"). So I’ve heard.

Re: Python Is Eating the World

#692
post #375

Earlier quoted context omitted.

This a complete misrepresentation of the Python philosophy and a cheap troll.

What makes you think it's a cheap troll? Please read the doctrine on how drastically different Python's philosophy is. The interpretation - It's my opinion. Take it or leave it.

Zen of Python. There are good reasons why a lot of the language is the way it is and it optimizes for developer happiness exactly by not letting you do everything under the sun.

Some languages take this to an extreme with its type systems or coding guidelines. For a lot of people Python is a very happy medium for a large subset of a lot of software written out there.

Re: Python Is Eating the World

#693

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then. I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were? In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error,…

In my CS program, we learned Python as a convenient way to sketch a program. We also learned C++ for speed and OCAML for those functional feels. A programming language is a tool, Python has some great use cases mostly focused around ease-of-programming.

Re: Python Is Eating the World

#694

Earlier quoted context omitted.

Why are you complaining about C in the 90s? If you'd been using punchcards in the 50s you'd have some perspective on some of the complaints and comments about C in 1990.

I'm actually not complaining about C in the '90s, it was amazing compared to Fortran in the '80s. Funny story, my first co-op job (Fortran IV), my boss made me fix a bug using punch cards so I'd appreciate why the codebase wasn't as nice as it might be. THAT was prespective.

Fortran was designed for punch cards - sometimes you could even "write" new code by picking old cards from your desk drawer.

Re: Python Is Eating the World

#695

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then. I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were? In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error,…

Your 2nd error isn't possible in Python, so I'm not sure what you did there. Regarding the first, sure, it is a bug that was annoying to catch. But, having an `Iterable` interface in Python is also really neat and useful if used responsibly. If you're programming regularly in Python, you are accustomed to the tradeoffs that come with a dynamic programming language and no static types, and you can still avoid issues like the one above.

Right off the top of my head, using type hints with a decent IDE or an assert statement would likely have caught the issue.

I'm not saying that Python doesn't have issues (all languages do), but I don't see the error noted above as any sort of deal breaker. On the other hand, if you're only ever going to use Python like a strongly typed language without taking any advantage of its dynamic characteristics, then I can see why it would seem as a total downgrade compared to languages like Java.

Re: Python Is Eating the World

#696

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Here's some rational "hate" for Python then. I just returned to Python for the first time in a little while to collaborate on a side project and ran into a few tricky-to-debug errors that caused a fair bit of lost time. Know what the errors were? In one case, I was iterating over the contents of what was supposed to be a list, but in some rare circumstances could instead be a string. Instead of throwing a type error,…

okay, so use type annotations and mypy --strict

Re: Python Is Eating the World

#697
post #83
post #33

Python has a lot of problems that really slow down development, but they are all fixable. The biggest issue, in my opinion, is in dependency management. Python has a horrible dependency management system, from top-to-bottom. Why do I need to make a "virtual environment" to have separate dependencies, and then source it my shell? Why do I need to manually add version numbers to a file? Why isn't there any builtin way…

Pipenv has felt to me like a pretty solid solution. It's not perfect but it's a lot better than the other options.

Last time I gave it a go, I found it was pretty strongly welded to virtualenv, rather than using Python's own (much less problematic) venv. I came away less than enthused as a result.

(To be fair, modifying it to use venv is... non-trivial).

Re: Python Is Eating the World

#698

Earlier quoted context omitted.

What if you are on Linux and your binary requires a slightly newer version of glibc for some reason etc. Static, portable binaries on Linux are hard.

That's why Docker is a good idea for packaging things up. You basically get exactly the combination of binaries, libraries, etc. you intend to run. Probably not a bad idea to use it for development as well. Or at least something like pyenv or whatever it is called these days.

Docker saves some pain, but introduces others.

You have a container that will run anywhere, but it has a bigger attack surface and needs updates.

I also would disagree that it's easier than using virtual environments for development, and only for packaging in some narrow use cases.

Re: Python Is Eating the World

#699
post #580

Earlier quoted context omitted.

> Programming in the large without type safety is a fool’s errand. Programming in the large without tests is a fool's errand. Type systems don't guarantee correctness.

No but they help. You can find figures of a 15%-38% reduction in bugs for TypeScript versus JavaScript. So that does not consider the additional effect of strong versus weak typing.

[deleted]

Re: Python Is Eating the World

#700

What I find baffling is that almost every program I'm interested in as a creative power user has a Python API for scripting, from type and graphic design to 3D modeling, rendering and music making. I'm a bit into web design/frontend as well, and was thinking about either learning JS and Node more deeply, or add some other "backend language" like PHP or Ruby, and learn their frameworks like Laravel or Rails. Should I…

Flask is pretty easy to get started with, Django is a batteries included monster.
Post reply on HN