Hacker News new | ask | show | jobs
by roryhughes 4433 days ago
Crazy. I knew PHP was bad, but this is just terrible.
3 comments

I know hating on PHP is en vogue but you could probably write the same ugly code with another language too.
Yes you could, but it's harder. extract($_GET) does not look as bad as eval(request.GET) but it's almost the same thing for example.
Not possible. Other languages have features to prevent this.
I highly doubt you have anything else to add because I'm sure you're just another person jumping on the "hate php" bandwagon - but go on, entertain me.

Please elaborate.

Most languages dont have extract($_POST) and hop,everything's overwritten... PHP has a lot of shit like this.Yeah you dont have to use them,but they shouldnt be here at first place,if PHP core devs cared about a sane API. PHP doesnt have a sane API. PHP core devs dont give a damn. That's why facebook developped Hack and HHVM.
Sorry to anyone who down voted me. I didn't mean PHP is a bad language. It has done amazing things for the web. I just didn't like the look of the many snippets of HTML in the code which is more common in PHP than in other languages in web development.
what if I told you PHP does not require you to write ugly code? You can do the same in any other language.
Oh, i'm completely aware of that. I was just really talking about this document, didn't mean to spark the debate.
but it makes it incredibly easy to, which is the reason why people hate it. If I'm a good programmer, of course I'll write good code. If I have to fix someone's shit code, of course I'm going to be incredibly angry if it's only there because the language encourages it.

Of course, if the language makes it very easy to write bad code, even as a good programmer I could easily end up writing stuff that's incomprehensible etc.