Hacker News new | ask | show | jobs
by sneak 2984 days ago
What if they enjoy writing non tokenized SQL statements with user input and without an ORM?

Some practices are bad. PHP was my first working language and I used it for years. I’ve since used a dozen other stacks in the intervening fifteen years. PHP is objectively a poor choice, an impediment to its user.

Someone who is told this, who doubles down on ignorance of better, more efficient, more predictable, consistent, safe, and useful languages, is worthy of ridicule—not because of their ignorance, but because of their will to remain ignorant.

5 comments

Sorry, but that's just silly.

I might agree that PHP is a poor choice in many ways, and that in many situations there's a much better alternative. But it's quite another thing to claim it's "objectively" a poor choice.

I have clients on small budgets who run on shared hosting, and the fact that these support PHP is enough reason to use it. I have clients whose needs are met almost perfectly by Wordpress, and using it requires using PHP. I know developers who have fairly successful small businesses on PHP and for them it would be "objectively" a bad idea to just drop all their knowledge and everything they've built so far in favor of an "objectively" better language.

Even just the fact that in some places or for some use cases it's significantly easier and cheaper to get an decent PHP developer than anything else is a reason to use PHP for some things.

"Someone who is told this ..."

By an authority such as yourself? Sure aren't we the lucky fellas to have somebody like you to tell us what's what

> What if they enjoy writing non tokenized SQL statements with user input and without an ORM?

Those functions have been deprecated in PHP for years, and they were just wrappers around existing C libraries to begin with/

And other languages have that as well. I've seen it done in C# and C++.

I wasn’t talking about SQL in PHP, I was talking about people who like pursuing sloppy and careless software engineering practices in general, like writing unsafe SQL queries using string concatenation [in any programming language].

Using PHP is the same thing.

The story about FizzBuzz is not literally asking you to implement FizzBuzz. It’s an illustration.

My comment could be rephrased: just because many people like doing things that are bad does not mean that those things aren’t bad. It just means that many people are ignorant.

Plenty of ORM choices in PHP. Also PDO if you want to write paramatised SQL queries.
>... worthy of ridicule—not because of their ignorance, but because of their will to remain ignorant.

The ironing is delicious.