Hacker News new | past | comments | ask | show | jobs | submit login

PHP is fine too. Check out https://laravel.com/ and tell me that doesn't look like a joy to work with.



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.


"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.


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.


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.


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.


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.


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.


And it has JIT support out of the box, while PyPy still needs to fight for adoption.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: