Live data from Hacker News

The State of Python in 2021

deprogrammaticaipsum.com

21–30 of 53 posts

Re: The State of Python in 2021

#21
post #15

In my office, everyone seems to avoid python like fire. The big reason seems to be that lack of static type checking makes their work harder in the long run.

Python is no Haskell but type hints does reach Pareto level for catching bugs. Mypy is now well integrated into IDE so no reason to have a type error anymore.

I will switch to python 3.10 as soon as it's released just for the better error messages and the typing goodies though.

Re: The State of Python in 2021

#23

Earlier quoted context omitted.

Although subjectively the look on Windows 10 seems a bit better than on previous versions, it still feels a bit ancient. So you may ask what's the point: if you create a GUI in 2021 you will probably want it to look modern and attractive. Even a modern TUI interface may look better.

Do you happen to know a more modern GUI framework for Python?

Not an expert at all and can’t vouch for quality but there’s at least wxpython, pyqt, and wrappers of gtk, win32 and cocoa out there. There’s also a .net interop lib which might talk to windows libraries.

Many others exist, too. Most are wrappers of some C++ lib, like Qt etc. some wrap these wrappers again.

Re: The State of Python in 2021

#25
post #15

In my office, everyone seems to avoid python like fire. The big reason seems to be that lack of static type checking makes their work harder in the long run.

This is true. But it doesn't necessarily make Python bad. It's just not the right tool for the job.

I love Python (I consider it my main language), but there are a ton of use cases for which I wouldn't use it for. Namely, if you need: robustness (provided by static typing, for example for critical systems), performance, parallelism. Scala, Rust, C# (Go, C++ also, but I dislike these two) are better options.

Re: The State of Python in 2021

#26

Every now and then I consider revisiting Python (I haven't used it in anger for a few years), but I am continually put off by the wild-west state of dependency management, lack of standard tooling and project configuration. Python's goal that "there should be one obvious way to do anything" is admirable, but doesn't seem like it's lived up to in any way. Say what you will about Golang, but I do like the fact that it…

Pip is standard for dependency management, but that didn’t stop others from building alternatives.

I don’t find there to be a lack of standard tooling. Rather, there’s too many options to choose from you might say. It’s what success looks like, I guess.

Re: The State of Python in 2021

#28
post #5

No love for Tkinter?

Although subjectively the look on Windows 10 seems a bit better than on previous versions, it still feels a bit ancient. So you may ask what's the point: if you create a GUI in 2021 you will probably want it to look modern and attractive. Even a modern TUI interface may look better.

Tk and Ttk are essentially different toolkits with a similar API. There are some decent looking themes (ark, breeze, yaru, there's even a bootstrap port) and also some native themes for Ttk. I believe the native Windows theme is Win32. You likely don't want an UI backed by Win32 widgets, for various reasons (poor performance, looks kind of bad, flicker/redraw issues, abandoned by MS).

I feel like desktop UIs on Windows have been in the state of "It hurts when I do this" - "Stop doing it then" for a number of years. "Just put everything in a web view" might actually be the best way to have a GUI on Windows nowadays, if you really need one, and otherwise you simply avoid having to run an application on Windows entirely whenever you can (=pure web app).

Re: The State of Python in 2021

#29
post #22

I don't understand how aiohttp isn't even mentioned. It's such a joy to write HTTP servers with it.

The whole async ecosystem in Python seems like a bordering-on-insane duplication of work, given that a huge amount of the benefits can be gained simply by running your application under gevent (which is what many in the WSGI server crowd have been doing for yonks). The fact that every piece of code has to be rewritten (and usually in a very stupid way, like putting 'async' and 'await' in the right spots and otherwise leaving things alone) is just madness.

I'll grant you that aiohttp has a much nicer interface for websockets than I've seen in gevent-based libraries, but that seems like a very small win compared to the huge downside of chucking out most of the web server ecosystem and starting again.

Re: The State of Python in 2021

#30
There are quite a few inaccuracies here.

Guido is now working on Python performance at Microsoft and is not the BDFL anymore. Instead, there is a five-person Steering Council overseeing Python.

The best C/C++ interaction options include Cython, cffi, and pybind11. None of those are mentioned. I don't know anybody still recommending SWIG.

No mention for FastAPI or asyncio is a big omission in the Web backend use case. Relatedly, the article still recommends Requests when the community is largely moving to httpx which supports both blocking and async networking.

For packaging, the author mentions and links to Conan (a C++ package manager) which sounds like he misheard Conda.

He's also saying that the easiest way to get Python on Windows is chocolatey. Well, if you type "python" into a command prompt on a fresh install of Windows, it will take you to the Windows Store where you can install the latest Python release with one click. For many users this gotta be easier than figuring out chocolatey.

There is no discussion on "Python, the language" and its state in 2021. I was looking forward to a discussion on that.

I don't mean to pile on but the definitive title sounded like we'd get something pretty authoritative. This ain't that.

Post reply on HN