News for hackers. Stuff that matters.
Re:Old box, dumb code, few thousand connections, no big deal by nexuist on Thursday May 07, 2020 @09:16PM (#23110362)
PHP is fine too. Check out https://laravel.com/ and tell me that doesn't look like a joy to work with.
Re:Old box, dumb code, few thousand connections, no big deal by franga2000 on Friday May 08, 2020 @05:16AM (#23112856)
I just got roped into a project with the promise of Django, but the project lead ended up deciding to go with Laravel, so I've been looking into it for a few days.

It's a resounding no from me. If you're stuck with PHP, sure, this beats the WordPress style of...well...I can't really find words to describe how bad it is..., but it's still miles behind anything else. It full of strings and other things that you just have to memorize with IDE integration even with specialised extensions still worse than other languages with standard IDEs.

Re:Old box, dumb code, few thousand connections, no big deal by zippoxer on Friday May 08, 2020 @04:49PM (#23119289)
"String-programming" is mostly optional. Modern Laravel is introducing type-safe alternatives. For instance, instead of doing validation like:

  'gender' => 'in:male,female,other'
You can now do:

  'gender' => Rule::in(['male', 'female', 'other'])
Which, coming from Go, I very much prefer.

Modern PHP is pushing for type-safety (via type-hinting) and Laravel is following this direction as well.

Re:Old box, dumb code, few thousand connections, no big deal by phreack on Thursday May 07, 2020 @09:25PM (#23110417)
How much of the old "A fractal of bad design" post would you say still applies? That one post showcased so many footguns right at the language level that it spooked me away from it forever.
Re:Old box, dumb code, few thousand connections, no big deal by smacktoward on Thursday May 07, 2020 @10:50PM (#23110919)
You can get a good sense for what "modern PHP" looks like by browsing through PHP The Right Way (https://phptherightway.com/).

PHP has grown up a lot over the last ten years.

Re:Old box, dumb code, few thousand connections, no big deal by neurostimulant on Thursday May 07, 2020 @10:26PM (#23110770)
A lot of those are still applies, but these days you can ignore those bad parts and only use the new good parts just like how you would use javascript. Still, I only use php occasionally but I wish it's not as eager in treating string as number in many cases.
Re:Old box, dumb code, few thousand connections, no big deal by RicardoLuis0 on Friday May 08, 2020 @12:22AM (#23111356)
if you have an hour to spare, this (https://www.youtube.com/watch?v=wCZ5TJCBWMg) is a great talk by Rasmus Lerdorf, the creator of PHP, on the design of the language, the reason it ended up the way it did, and the ways that it is evolving for the better.
Re:Old box, dumb code, few thousand connections, no big deal by bschwindHN on Friday May 08, 2020 @01:25AM (#23111660)
I took a look, doesn't seem like a joy to me.

It's too stringly-typed for my tastes, seems like a lot of errors you can make will only be caught at runtime.

Re:Old box, dumb code, few thousand connections, no big deal by pjmlp on Friday May 08, 2020 @08:27AM (#23114028)
And it has JIT support out of the box, while PyPy still needs to fight for adoption.