News for hackers. Stuff that matters.
Re:PHP is worth learning and using by fooyc on Thursday November 18, 2021 @09:56AM (#29266102)
Async code is a good way to achieve some level for performance in I/O bound workloads, but it's a pain for the programmer. Because of that I wouldn't say that it's necessarily a good thing that JS is async-first.

In my opinion, high level languages should not expose async primitives to the programmer - this should be abstracted away by the language and its runtime. Go is doing this (all I/O is async under the hood), and it's awesome: You can write synchronous/sequential code and get the performances of async. I would love if other languages copied that.

Re:PHP is worth learning and using by Klathmon on Thursday November 18, 2021 @04:21PM (#29270739)
>In my opinion, high level languages should not expose async primitives to the programmer

Just another reason why the "each request gets a process" architecture can work well. You generally don't need to worry about async stuff in PHP, because your request has the whole process to itself.

Re:PHP is worth learning and using by afiori on Thursday November 18, 2021 @12:23PM (#29267947)
Before being async as in async/await Javascript was also async as in having an external event loop and being event driven.
Re:PHP is worth learning and using by fooyc on Thursday November 18, 2021 @06:14PM (#29271831)
Yup. Go too, but the programmer doesn't need to know it.