Earlier quoted context omitted.
> I really enjoy working with python over any other language. I assume you mean, "over any other language I have tried" ? As someone with a mathematical background myself, I am always surprised at how many data scientists and quants are ignoring more mathematically principled languages like F#, OCaml and Haskell.
F#, OCaml and Haskell Can I quickly prototype a new deep learning model and scale it to a 32 GPU cluster with very little effort in those languages?
Python Is Eating the World
271–280 of 993 posts
Re: Python Is Eating the World
#272Re: Python Is Eating the World
#273Earlier quoted context omitted.
Display size has nothing to do with it. Long lines are hard to read: https://en.wikipedia.org/wiki/Line_length
I obviously don't agree, but it is worth noting that comparing typographic conventions for English with typographic conventions for code is not a very good idea, to me. Especially when we're discussing a language with semantically active whitespace. A 100 character line might only see 15-70 characters of active use.
Re: Python Is Eating the World
#274Earlier quoted context omitted.
This is about as sensible to me as saying it is a good idea because most trains are longer than they are wide. Who cares about those things, we use computers that nearly all have 4:3 or 16:~10 displays (or wider), and many of use use more than one of them.
Display size has nothing to do with it. Long lines are hard to read: https://en.wikipedia.org/wiki/Line_length
Re: Python Is Eating the World
#275Earlier quoted context omitted.
It seems to value my time quite highly, as I can achieve most things more quickly and easily in Python than any other language I know. Can you be more specific about how it increases your burnout? Is it the language, or someone forcing you to use that linter and settings?
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…
I see the point that python invites these anti patterns.
But on the other hand, a software developer that returns Union(list[item], item]) in Python is probably also going to mess up a Java program sooner or later.
Re: Python Is Eating the World
#276Earlier quoted context omitted.
I'm sympathetic that Python is relatively not a great language, but IMHO an 80-character line limit is quite reasonable. It's easier to read on smaller screens, easier to view side-by-side diffs, and tends to force you to break up your code more. That said, this shouldn't be a lint, it should just be enforced by a formatting tool as a format-on-save setting. It just destroys all the wasted arguments about formatting…
I'd also add that while perhaps a bit on the pessimistic side, I tend to view the 80 char rule / limit not as an ancient hardware limitation of monitors, but as a limitation of our eyes and visual processing circuitry. There is a reason why newspapers and well laid-out websites don't have 300 char width lines. Those are physically harder to read, whether we want to admit it or not, as our eyes lose track of the flow…
If you've ever had to deal with this in an email client, you can quickly see that 80 is undershooting it in the modern era.
Re: Python Is Eating the World
#277Earlier quoted context omitted.
Thanks, that definitely looks like useful data as a starting point. 1. What is the impact of a continuous long-running process? That is, if instead of trying to calculate a result and then shut down, I'm running a web server 24/7, what's the impact of an interpreted language over a compiled language? (Assume requests are few and I'm happy with performance with either.) This not models web servers but things like data…
> Put another way, if using the interpreted language saved even one minute of developer time, it was a net win for the carbon emissions of the program Developers continue breathing even when they aren't programming.
Re: Python Is Eating the World
#278Earlier quoted context omitted.
I don't know what parallel reality you live in but there are few languages with as many packages for getting productive things done than Python. In web dev andam data science I have yet to see a language with as many libraries for useful stuff. Now, if what you're looking for is high performance and precise memory management, sure, the language will never give you that. What language has as many easily available libr…
Well, that's what I said, there are plenty of packages for data science. For building APIs and web stuff usually there aren't. Python is nowhere near NodeJS for instance. But whatever suits, if you only know one language, it will seem like the best language out there.
You have Django and DRF and Flask. DRF is, by far, the best designed framework for building APIs in any programming language I have ever seen, and I've at this game for a long time.
JavaScript has 10 times more packages than PyPi, and for the most part they are absolute garbage with no intent on being maintained.
Python has substantially fewer packages where the community rallies around them and keeps them as best-in-class. SQLAlchemy, DRF, factoryboy, requests, etc., are all incredible one-stop-shops for the vast majority of use cases.
You don't need 15 libraries for doing HTTP requests. You just need one good one that does the job so you never have to think about the problem ever again. Python excels at this class of libraries and by comparison npm has appalling choices.
Re: Python Is Eating the World
#279Earlier 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'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 repr…
In fact, the Python developers recently doubled-down on the design by introducing `StopAsyncIteration`.
Re: Python Is Eating the World
#280Reading 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…
The surveys never tell me why though. What do people like or dislike about python? I know it has a lot of libraries people love (scikit-learn, tensorflow come to mind)
[1] https://insights.stackoverflow.com/survey/2018/#most-loved-d...