Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

21–30 of 402 posts

Re: I still love PHP and JavaScript

#21
This really speaks to my heart. I learned programming as a young kid when my uncle taught my pascal. But I just couldn't see the point of console programs and never really got into it. Eventually I picked up late 90s HTML (hello geocities!) and php was a natural next step. I still remember going to the library to borrow the book PHP and MySQL web development. It was so empowering. I could make any kind of application I wanted and see the result in my browser, GUI and all (Win32 API was way beyond me at that age). I made my own forums, ebay clone, and a few web apps for an old Korean MMO.

Fast forward a few decades, and things look very different. Tons of web app backends being written in go, nodeJS/TS, and I recently learned people write them in rust+webasm. It's just crazy to me. I've worked on FOSS projects that are massively over-complicated because of their platform/language choice, when they would've been very straightforward php choices. But php still has this weird stigma about it despite most of the old concerns having been addressed.

I do have to say, though, that front end web development is way better than before with the advent of React and co, webpack, css libraries etc. Doing all that html/js/css by hand was always painful.

Re: I still love PHP and JavaScript

#22
post #12
post #7

Earlier quoted context omitted.

What do you think the advantages would be over a de-facto standard?

Think about it like this. How would you feel about Go, Rust or Node, removing their package managers from all new versions? Then they make a blog post saying, "we are going to let the rich community handle any future work of developing and distributing a package manager".

PHP is a community project where Go and Rust are corporate sponsored projects. It makes sense for php where it would seem foreign to those projects.

Re: I still love PHP and JavaScript

#23
PHP was my first backend language when I deployed my first project on the web. So easy to deploy and easy to enter.

I still love laravel until now, would choose it again sometimes just to have fun with it. However it's just never used in big companies so I always end up with python or java (not even c# around here except MSFT lol)

Re: I still love PHP and JavaScript

#24
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

I really like the serverless aspect. I still think nothing has the deployment story that PHP applications have. Just upload some source and your website is up.

It is also JSX before JSX was invented too :-)

Re: I still love PHP and JavaScript

#25
post #16
post #11

Earlier quoted context omitted.

Composer is the de facto package manager for PHP. I’ve never seen anyone try to compete with it. I also don’t believe a bundled package manager is necessary — NPM isn’t bundled with JavaScript, and it seems to be doing ok.

> NPM isn’t bundled with JavaScript, and it seems to be doing ok I'm not sure what point you're trying to make here. If you install the Node runtime, it comes with NPM. So it seems you're not correct about this, unless you are referring to some other runtime. And even if you are, why would some other runtime include NPM?

mmm.. to be fair, I think you're making the point for them. Also, I would be of the opinion that browsers provide a more common runtime than node.

Re: I still love PHP and JavaScript

#28
You can write good code without compile time type checking, but it requires so much more developer focus to avoid writing bugs than a language with type checking. Everything else, php’s “jankyness”, javascript’s mystifying truthyness tables, those are easily overcome problems. Handing a string to a function expecting a number, and not finding out about it until that code actually runs? That’s the real problem, imo

Re: I still love PHP and JavaScript

#29
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

Did they get rid of the giant config file with all the interpreter options that can seem like they shouldn't exist?

(I do like modern PHP well enough.)

Re: I still love PHP and JavaScript

#30
post #20
post #16

Earlier quoted context omitted.

> NPM isn’t bundled with JavaScript, and it seems to be doing ok I'm not sure what point you're trying to make here. If you install the Node runtime, it comes with NPM. So it seems you're not correct about this, unless you are referring to some other runtime. And even if you are, why would some other runtime include NPM?

>>I also don’t believe a bundled package manager is necessary — NPM isn’t bundled with JavaScript, and it seems to be doing ok. >I'm not sure what point you're trying to make here. If you install the Node runtime...And even if you are, why would some other runtime include NPM? Node nor any other package managers are included with JS. You seem to be emphasizing their point.

huh? Node is a JavaScript runtime. Its the "base thing". Its "JavaScript", at least in the sense that we are talking about here. So saying "Node isn't included", doesn't really make sense.

When you install Node, you also get NPM, which is essentially what I said in the previous comment.

Post reply on HN