3 ms·
I agree with the article, in fact I moved away from node.js to php/laravel for backend. Async is not the priority for all the things I need as far as product de
by ausjke 10y ago
I agree with the article, in fact I moved away from node.js to php/laravel for backend. Async is not the priority for all the things I need as far as product devel goes.
- deleted 10y ago[deleted]
- theprotocol 10y agoI'm currently working with PHP and node on different projects, and I find PHP worse in the 3 criteria used in the article: - Library: This is debatable, but I find PHP's library far worse than node's in both diversity and API design. The reliance on npm isn't a downside for me, and I find npm far superior to composer in usability. - Error handling: In PHP, try-catch doesn't catch fatal errors. Handling fatal errors is very hacky and ill-conceived (they all get funneled into a single, weird, script-scope handler function). Inb4 you don't want to handle fatal errors: sorry, but there are many use cases where this is essential, such as self-respawning worker scripts and any kind of customized logging. - While node forces you to think about async, PHP doesn't even have it, and I don't quite see this as a net positive. I also don't think node's async-await is very problematic on the server side (whereas client-side support is rare and its transpilation is pretty rough).