Live data from Hacker News

Python Is Eating the World

zdnet.com

251–260 of 993 posts

Re: Python Is Eating the World

#251

Earlier quoted context omitted.

I don't know why you hate it so much TBH. It is a language, better than MatLab/R/SPSS, which come before it. I honestly don't think it is that bad. And they are many people don't care from a programming language perspective, they need to just finish the functionality.

> It is a language, better than MatLab/R/SPSS, which come before it. I don't think so. I think R is a lot more expressive and not really any harder to read. It might have a steeper learning curve, but it's not so bad that I think that actually matters.

I think R is a much worse programming language, like 1 indexing, very unintuitive string manipulation, dataframe being the magic facade that hides complexity, etc.

I would choose Python any day if the other option is R.

Re: Python Is Eating the World

#252

It's so refreshing to not see anyone here whining about Python forcing them to indent their code properly. The kind of people who think that's a PROBLEM instead of a FEATURE really should not be ever writing any new code, and instead should be punished by forcing them to maintain other people's code written with that same lazy misguided attitude, until they recognize how self indulgent, inconsiderate, and disrespectf…

I am a novice programmer who started with python and have recently been using javascript, where I use auto-indent-on-save.

Coming back to python is annoying because it's harder to make sure code is at the right indent level than to use { }.

In fact writing this comment inspired me to find this: https://github.com/mathialo/bython

Re: Python Is Eating the World

#253

Earlier quoted context omitted.

I am about to hit a decade of python experience. I work with it daily, all my major codebases are written in it. I hate it. It has an ok object system which is possibly its only redeeming quality. I found Racket about 4 years ago, and any new project that I work on will be in Racket or CL. I could go on at length about the happy path mentality of python and the apologists who are too ignorant of other people's use ca…

Thanks for sharing, it certainly makes me feel better about my troubles with accepting python. And "the happy path" might be a state you spend a /minority/ of your time in, depending on project. So first you spend 10% of your time to fix the 80% of easy features, but the tricky stuff can be more awful than it should be. And packages. I thought I was just stupid, but thankfully there was more to it.

Quite welcome. I think you are on to something. The thought that comes to mind is "Python is a great language if you want to do exactly what everyone else is doing." Most of the love has nothing to do with the language itself, but rather the fact that people can make use of some library that a big engineering effort produced in another language entirely. Thus they conflate Python with access to that functionality. All of my code bases are pure python (in part because of the packaging issues), so maybe that is the difference, people aren't really Python users, they are numpy, pandas, django, sqlalchemy, or requests users. It would be interesting to compare the view of library maintainers vs just 'users.'

Re: Python Is Eating the World

#254

Earlier quoted context omitted.

I'm not the person you're responding to but what they say resonates with me as a Python developer. I believe Python is quite possibly the best language for a few things * Exploratory programming - such as what data scientists do * Writing programs that will never grow beyond 150LOC, or roughly what fits on a screen + one page down When I have those two constraints met I am almost always choosing Python. Here are some…

> The common "don't use exceptions for control flow" is broken right off the bat with StopIteration. I just think error handling in Python is god awful, really. Python explicitly does not agree with this... The same for a lot of your other complaints. It sounds like you are trying to write some other language in Python. Similarly if someone in a team using Java tried writing Python in Java they would complain a lot a…

Python's exception system isn't bad. It's way ahead of Java's or C++ exceptions. The gyrations people go through in Go or Rust to handle errors are far worse. The exception hierarchy lets you capture an exception further up the tree to subsume all the more detailed exceptions. (Although the new exception hierarchy in 3.x is worse than the old one. In 2.x, "EnvironmentError" was the parent of all exceptions which represented problems outside the program, including the HTTP errors.[1] That seems to have been lost in 3.x).

I think StopIteration is being removed. That was a a bad idea.

Re: Python Is Eating the World

#255

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Well in my world, the other language is Java, not Haskell. Alone in this?

What about .NET Core?

Re: Python Is Eating the World

#256

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Yeah, I'm a bit sick of Python. We have some internal utilities written in it and while developers could manage all the dependencies and everything, we kept having problems with getting everything working on the machines of our electronics techs.

Gradually pretty much everything has been rewritten in C++ (with Qt GUI framework). Way easier to be able to have a setup program (using free InnoSetup) that just extracts the eight or so DLLs required in the same folder as the EXE and that's it.

We just use Python for a bit of prototyping and data crunching here and there now.

Re: Python Is Eating the World

#257
post #98

Earlier quoted context omitted.

Solution ? Use Nix. > nix-shell -p python3Packages.numpy python3Packages.my_important_package It solves every problem you quoted before.

Or something that works with PyPI directly https://news.ycombinator.com/item?id=20672329

> Or something that works with PyPI directly

Poetry is python specific and does not solve the problems that pip/pypi has with native C/C++/Rust/etc modules.

Nix/guix solves all of that

Re: Python Is Eating the World

#258

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Disclaimer, I am a data scientist I feel the complete opposite. I really enjoy working with python over any other language. R does linear models and time series better and matlab has its charm, but overall I prefer python. Python is so easy to read and quick to program in. I am so glad I am not in the Java/C++ world anymore, but I know people in different roles have to deal with different issues.

Well, yeah compared to R and matlab, I am willing to believe Python excels, but the person you are replying to is probably not doing data science, so he has options besides the 3 just mentioned.

Re: Python Is Eating the World

#259

It's not flexible as PHP does, but I guess it's faster than PHP.

When it comes to raw performance, PHP7 is much faster than Python.

PHP is more flexible when it comes to building web applications. But in some areas Python just have better libraries (computer vision, matrices, high-level mathematical functions). I remember reading that PHP is going to add FFI and I believe FFI will have a big impact in PHP world.

Re: Python Is Eating the World

#260
post #229

Earlier quoted context omitted.

> The common "don't use exceptions for control flow" is broken right off the bat with StopIteration. I just think error handling in Python is god awful, really. Python explicitly does not agree with this... The same for a lot of your other complaints. It sounds like you are trying to write some other language in Python. Similarly if someone in a team using Java tried writing Python in Java they would complain a lot a…

> Python explicitly does not agree with this... Whats the convincing argument for defending this? Ive always heard its just the way python is. Through experience using exceptions for anything other then exceptional situations and errors seems messy.

I suppose that comes back to use cases. I am one of the 'getting things done crowd', rather than a computer scientist. A lot of my work had been in things like EDI, or similar integration code.

Imagine you are working through a series of EDI files and trying to post them to a badly documented Rest(ish) API of some enterprise system. If the file is bad (for whatever reason) you need to log the exception and put the file in a bad directory.

Pythons use of exceptions for control flow is perfect for this. If file doesn't load for whatever undocumented reason, revert back to log and handle the fallout.

"Oh I see a pattern, this API doesn't like address lines over 40 characters, I will add a custom exception to make the logging clearer, and go and try and see if I can fix this upstream. If not I will have to write some validation"

It is this dirty world of taking some other systems dirty data and posting it to some other systems dirty API that I find Python rules.

I have never worked on a large application where I owned the data end-to-end. Maybe there are better choices than Python for that?

Post reply on HN