Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So what? Part of the reason PHP is such a disgusting mess is because it is a raft of haphazardly accumulated features.



For someone that works on Go at Google I'm shocked by your very much subjective view of PHP. Elitist much?


That comment didn't even come across as elitist. There was no need to get personal.


He works on Go at Google. A skilled professional no doubt, could he not have made some valid points rather than simply calling PHP disgusting. It didn't add anything to the conversation.

If you where in the pub and someone spent some time listing the virtues of the pint they where drinking, and then someone joined in the conversation and called it disgusting with no basis .. wouldn't you find that to be odd behavior?


He did explain why PHP is disgusting mess.

And hell, the fact that people have that opinion stems from somewhere. And that is a fact we should all take a note of -- to build better tools. You see, PHP is nothing but a tool, and as a tool, it's not very liked one due to it's flaws. Solution? Abandon it! Build new, better tools instead of feeling threathened.

Le PHP sink and die it's well deserved death and make way for better tools, because professionals shouldn't feel attached to their tools, instead they should be critical towards them and look to find better ones.


And that is precisely what Tim is saying. He happens to work mostly with the new tool named Go but he does recognize that there are others like Rust and Dart that are also trying to do things better.

But we need to actually move away from using bad tools (and this has happened with PERL) and start using the newer, better tools more often. Every software developer should learn some Erlang (or Elixir), some Clojure, some Go, etc.

If you don't try these tools out and kick the tires for a while, then you end up stuck in the past like all those COBOL programmers.


Oh god. It's Perl. And no need to drag it through the mud here. It's pretty much the only language that gets Unicode right. It has nothing in common with the abject misery that is PHP. Perl came out in '87. Erlang came out in '86. I don't know what you're high on, other than trends and trendwhores.

Clojure isn't new. Not to take a dig at Rich Hickey, but everything he is doing with immutable objects was done more than a decade ago by the likes of Henry Baker (http://home.pipeline.com/~hbaker1/home.html). Of course, everything that has ever been tried at all has been tried in some variant of Lisp/Scheme at one point in time.


Clojure isn't new. Not to take a dig at Rich Hickey, but everything he is doing with immutable objects was done more than a decade ago by the likes of Henry Baker (http://home.pipeline.com/~hbaker1/home.html). Of course, everything that has ever been tried at all has been tried in some variant of Lisp/Scheme at one point in time.

Stop while you're behind. Nobody believes that Henry Baker's papers are equal to what Rich Hickey has done with immutable objects. Geez, get a grip on reality man.


I might be wrong, but COBOL isn't being actively developed as a language anymore .. PHP however is still solving problems and under constant development and improving all the time.


> PHP however is still solving problems

But is it solving more problems than it creates?


PHP is great for developers and firms because they are always required to stay and make sure things blow up. Most of the PHP I've worked with was also very hard to decipher by anyone except the original developer.


Hi memracom,

Where will Perl 6 sit when/if it becomes something you could realistically use? Would you classify it as one of the bad tools or a newer, better one?


"haphazardly accumulated features" is not an explanation, it's a subjective point of view.

"it's not very liked one due to it's flaws", PHP is very well liked, just not by everyone .. which goes for most things in life.


"haphazardly accumulated features" is not an explanation, it's a subjective point of view.

If you really need it, here's a very good write-up which should cover that in an impressively detailed manner:

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...


This was hotly debated, by myself included, right here on HN: https://news.ycombinator.com/item?id=3820431

He has updated the article over time which is good of him, but much of it is still subjective and from a quick glance there are points that no longer hold true.



It was a long one, and I'll admit I only skimmed it.

But from a glance, it looks like the one writing the rebuttal didn't really understand the criticism, and is himself 100% captured by the exact mindset which the original article criticized PHP for having.

This guy is the one who will be standing at the door complaining that you just broke his house. He is what is wrong with PHP.

And naturally, however much sense he thinks his argument makes, it will still be wrong. It's in the very nature of this situation.


He probably didn't elaborate because he felt the basis for the view was clear - there are clearly areas of PHP which still need work. PHP is often frowned upon because the APIs are a mess of legacy cruft like addslashes, magic_quotes, mysql_escape_string, mysql_real_escape_string, mysqli_real_escape_string versus prepared statements. Efforts are being made to clean it up, but for a language to ever end up in a place with that sort of library functions is a pretty big red flag.


Check the manual; magic_quotes, mysql_escape_string and mysql_real_escape_string have already been deprecated/removed.


I'm aware of that thanks, as noted in the last line:

Efforts are being made to clean it up, but for a language to ever end up in a place with that sort of library functions is a pretty big red flag.


"for a language to ever end up in a place with that sort of library functions is a pretty big red flag."

At the time it was reasonable .. but PHP evolved and learned lessons, it didn't just stop there as you seem to be saying.


mysql_escape_string [1] mysql_real_escape_string [2]

Why is exposing a C library's functions and their names PHP's fault?

[1] http://dev.mysql.com/doc/refman/5.5/en/mysql-escape-string.h... [2] http://dev.mysql.com/doc/refman/5.5/en/mysql-real-escape-str...


Because php ends up combining the API consistency of C with the syntactic elegance of visual basic. I say this as someone who programs php professionally, the fact that they still haven't provided a complete set of OO api's very much speaks against the language stewards. PHP could have a sane subset, like javascript, but because there are gaps in the API (like the string and array API's, which are horrible) you can't get a sane subset without adding some extra API wrappers of your own.

And that's why it's impossible to build frameworkless PHP code that is elegant, something that even the designed-in-10-days javascript lets you do.

Still, i like php for its getting things done mentality. What it lacks in elegance it makes up for in productivity.


Do you really want another thread in which everybody enumerates their favorite issues with php?


Sorry if I upset you. Your feature list is no stronger a point than my response, though. Features don't make a language great. Clarity, consistency, simplicity, and orthogonality do. PHP has none of those qualities. I know, because I used it extensively for a decade.

I stand by my comment. I can see why people like PHP but nobody in their right mind should deny that it is a mess and that it was constructed haphazardly.


Even if he hadn't explained why, and he did, it still wouldn't be elitist.


"Elitist?" I came into web development via the PHP tradesman's entrance, and until by the grace of God I found my way out into the wider world, I didn't even begin to suspect just how miserable I had it. If there's a tinge of elitism in the wider world's attitude toward PHP, I'll be the first to contend that it's justified.


Yeah I think you are more like an ex-smoker who after you managed to quit tells everyone who awful smoking is :)


Not really a parallel; you'll never meet a long-time cigarette smoker who doesn't know how awful a habit it is, although you'll probably meet some who will lie about it.

On the other hand -- and I say this as a smoker, albeit as one who's cut back his habit to almost nothing over the last couple years -- smoking is an awful habit, which is both severely addictive and without meaningful benefit for the person with the habit or for anyone else. So I suppose I'm not all that inclined to quibble about the not-quite-perfect parallel, after all. :)


In other words. The parallel is perfect.


It's not just his view, there are other people who feel the same way about PHP.


I wrote PHP code for 10 years. You could say my relationship with the language is pretty subjective.


When did you stop developing with PHP?

edit: you know what would be great, if you could show some common programming examples in PHP and how Go would manage the same situation.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: