Php is evolving into a pretty good language. Thanks god I'll develop only new projects from now on, so I get to enjoy every single new feature that's being released.
Honestly, when you are writing about concurrency with a title like "php is not truly async", chances are that people, who are reading it, already know what threads and processes are. Same goes for the concept of synchronism.
Going through all of that is kinda pointless and makes your article hard to follow since its "meat" is aimed at intermediate developers, but it has a wall of beginner level information preventing the reader from reaching the important part.
I also think that, by adding all of that "unnecessary" information, you missed the chance to elaborate more on why you'd say that async php is not truly async.
I get that you probably meant that it is not truly async because you still need to get into a message loop in order to make it work or because those native functions don't receive a callback.
Never heard of this pattern and, honestly, not sure if I like it.
It seems like it would be more useful in C++ where overloading would make the "accept" function not necessary I believe. It'd be more readable as well since having a function called "accept" returning an integer doesn't sit well for me.
In C++ you'd just PageCounter::getPageCount(document) since, in C++, you can declare the method getPageCount as many times as you want as long as the parameters have different types.
In C# you could even declare it as an extension method and then just call document.getPageCount() directly without even touching the class's original declaration(which is awesome honestly and should be copied by php).
Php is evolving into a pretty good language. Thanks god I'll develop only new projects from now on, so I get to enjoy every single new feature that's being released.
Honestly, when you are writing about concurrency with a title like "php is not truly async", chances are that people, who are reading it, already know what threads and processes are. Same goes for the concept of synchronism.
Going through all of that is kinda pointless and makes your article hard to follow since its "meat" is aimed at intermediate developers, but it has a wall of beginner level information preventing the reader from reaching the important part.
I also think that, by adding all of that "unnecessary" information, you missed the chance to elaborate more on why you'd say that async php is not truly async.
I get that you probably meant that it is not truly async because you still need to get into a message loop in order to make it work or because those native functions don't receive a callback.
But you could've expanded further by using php's native coroutines for example(https://www.npopov.com/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP.html).
But anyway, just my two cents. The article is very well written and you obviously put a lot of effort into it.
cheers
Now imagine if they'd have included a less obvious vulnerability and it'd made it through to a release branch.
Holy moly
Never heard of this pattern and, honestly, not sure if I like it.
It seems like it would be more useful in C++ where overloading would make the "accept" function not necessary I believe. It'd be more readable as well since having a function called "accept" returning an integer doesn't sit well for me.
In C++ you'd just
PageCounter::getPageCount(document)since, in C++, you can declare the method getPageCount as many times as you want as long as the parameters have different types.In C# you could even declare it as an extension method and then just call
document.getPageCount()directly without even touching the class's original declaration(which is awesome honestly and should be copied by php).git repo or it didn't happen