←back to thread

193 points ingve | 4 comments | | HN request time: 0.283s | source
1. wodenokoto ◴[] No.43714946[source]
I don't know how async is in other languages but I find Pythons async incredibly difficult to use, and I kinda feel validated about how poor chatGPT is at it as well.

Is it because it is just a very hard thing, or is it because its a synchronous language, with async bolted on? (I'm talking about a purely language point of view, not from a python VM / GIL point of view)

replies(2): >>43715123 #>>43715191 #
2. aeonik ◴[] No.43715123[source]
The easiest language I’ve used for async is Clojure—mostly because the language is immutable by default and ~99% of the code is referentially transparent. That doesn’t magically solve async, but it removes an entire class of headaches by nudging you away from shared state and side effects. You don’t need locks if there’s nothing to lock.

Async is hard, no doubt—but some languages are designed to reduce the surface area of what can go wrong. I’ve heard great things about Erlang, Elixir, and BEAM-based languages in general. They treat async not as an add-on, but as a core architectural principle.

3. Starlevel004 ◴[] No.43715191[source]
It's because ``asyncio`` is a dogwater library that's barely functional and full of footguns. The ecosystem is about the same quality too.
replies(1): >>43717193 #
4. gpderetta ◴[] No.43717193[source]
Indeed, as much as I dislike async in general, asyncio is its own special hell.