Live data from Hacker News

Python Is Eating the World

zdnet.com

311–320 of 993 posts

Re: Python Is Eating the World

#311

Earlier quoted context omitted.

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…

I haven't seen anything about `StopIteration` being removed? In fact, the Python developers recently doubled-down on the design by introducing `StopAsyncIteration`.

PEP 479 might be what GP was referring to: https://www.python.org/dev/peps/pep-0479/

PEP 479 is specifically related to generators:

> If a StopIteration is about to bubble out of a generator frame, it is replaced with RuntimeError, which causes the next() call (which invoked the generator) to fail, passing that exception out. From then on it's just like any old exception.

Re: Python Is Eating the World

#312

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…

Thanks for posting. I've wondered if it's just me or does anyone else want to leave software engineering because of Python's dominance. There's no arguing against it either because as this thread shows, "I like it for my use case, look at these libraries that let you get X and Y done SOOOO easy, so it must be great for everything."

Re: Python Is Eating the World

#313
post #261

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?

For those unaware: Haskell has a REPL (ghci), and you can make files more script-like with the (currently most popular) build tool stack[0] if you include:

  #!/usr/bin/env stack
  -- stack --resolver lts-6.25 script --package turtle
(as you see it includes easy dependency management :) )

0: https://docs.haskellstack.org/en/stable/README/

Re: Python Is Eating the World

#314

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... OK, I'm willing to contend that that is the case. It doesn't have much to do with my overall issue with error handling. > 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 and end up with ugly hard to work with…

Writing programs that will never grow beyond 150LOC, or roughly what fits on a screen + one page down

I've written Python for years, I think I gave it due credit for what it's good at.

I'm not sure how fair this assessment is, considering the multitude of Python projects of considerable size and scope.

Re: Python Is Eating the World

#315
post #241
post #156

Earlier quoted context omitted.

> Unfortunately Python predates the realization that good packaging tools were a thing that needs to be solved in the core language and not externally (Go, Rust, Node, etc. postdate this realization; C, Perl, Java, etc. also predate it). Sure, but it's also a cultural thing. Ruby is nearly as old, and also predates this, but has nowhere near the insanity of Python. The community jumped on bundler and rvm/rbenv/etc su…

Ruby was exotic until someone translated the docs to English, but the whole ecosystem is indeed one reason I love Ruby. I really don't understand why python 2.7 is still a thing 11 years later. Sure, legacy systems, but if I install recently active open source on my machine I wouldn't expect it to use an outdated version of a programming language. Upgrading can't be that hard.

python 2.7 is still a thing because it was announced as the LTS* release over a decade ago.

* nobody called it that, but thats effectively what it meant to say “there will be no python 2.8. Python 2.7 will be supported until T. Python 3.x will be superceded in a year.”

Re: Python Is Eating the World

#316

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 t…

> 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.

You can do the same with Python.

Re: Python Is Eating the World

#317
What stood out to me, reading the comments, is how among the first few comments I read there were 4 comments from people with decades of experience writing python professionally. Each stating their dislike for the language and citing entirely different parts of the language as its biggest problem.

Personally, I'm primarily a C++ programmer with about a decade of professional experience in C++. I also used to do daily work in C# for a few years. For me, python is a language which I use for making simple command line tools, for processing input and clobbering together different tools. I use it to build interfaces which streamline certain workflows. Essentially, I use it as a more powerful replacement for bash or batch. For that purpose, I find that the language works wonders and is quick and easy to work with.

Re: Python Is Eating the World

#318
post #290

Earlier quoted context omitted.

If you put in as much time as you have learning Python, then the answer is probably yes.

Probably yes What does it mean? Have you done it in any of those language? Have you seen it done in any of those languages?

Although I'm not sure what you mean by "deep learning", you can take a look at Spark: https://spark.apache.org/mllib/

As a bonus, it IS Python (numpy) in the background mixed with Scala. So you can use each language where they make the most sense - Python for the maths number crunching and Scala for the business logic and the architecture.

I think Spark also has .net bindings (so you can also tick F# on that list...).

Re: Python Is Eating the World

#319

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…

> and that infernal pep-8 linter insisting 80 characters is a sensible standard in 2019

I don't know why 80 characters is a problem. I don't use the linter but I enforce this rule religiously with a couple of exceptions (long strings comes to mind). It forces me to think heavily about the structure of the code I'm writing. If I'm nesting so deeply, something has gone wrong. If I've got a ton of chained methods or really lengthy variables, it forces me to rethink them.

This also has the advantage of being able to put 4 files next to each other with full visibility. Vertical space is infinite, horizontal space isn't. It's probably a good idea to use it.

Re: Python Is Eating the World

#320
I've been told that my choice of python was poor numerous times. 'Do java/.net' etc. is something I've heard all throughout my career. I use python because it doesn't work against me - It's not the best language but I think its definitely the most versatile. I love python and it will be around for another decade I guarantee it.
Post reply on HN