Comment by vips7L

Comment by vips7L 18 hours ago

0 replies

> He mentions 2015 era Java as being ok, but as someone that’s written a lot of multithreaded Java code, it’s easy to mess up and people spam the “synchronized” keyword/“color” everywhere as a result. I don’t feel the lack of colors in Java makes it particularly intuitive or conceptually simpler.

Async as a keyword doesn’t solve this or make writing parallel code any easier. You can still mess this up even if every function is annotated as async.

> A function with only synchronous code behaves very differently than one that runs code inside another thread or in a different tick of the event loop.

I think this is conflating properties of multiple runtimes. This is true in JavaScript because the runtime works on an event loop. In Java an “async” function that reads from a file or makes an http call doesn’t run in a different threads and doesn’t run in a different tick of an event loop. So what value does it have in that type of runtime?

Personally for me I think “async” is putting pain on a lot of developers where 99% of all code is not parallel and doesn’t share memory.