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

Who cares? It doesn't make the language any better.



And who cares about that, in turn? It's just the glue you write your data structures, objects and functions in. You can still write shitty code in a nice language, and you can architect something well thought out in BASIC.

A nice language makes for shorter, more expressive code, sure, but that's like having a fast car that handles well; it still matters more where you're driving it. If someone is making a trip with a caravan of a million rust buckets to a nice place, why would they care about some Porsche owner moaning about how that is all so very wrong?

If PHP developers complained all the time about how programming sucks, then you could maybe tell them to use a better language. But the PHP devs aren't really complaining, rather people who aren't even using it.

People use Wikipedia. I dare say Wikipedia improved a lot of lives a lot. Meanwhile, a gazillion static blog generators written in hip language of the day prove no real benefit over notepad, or this textarea right here. It's like making a trip with a handful of people to a place that's been explored by others decades ago, and then being bitter that nobody cares, and hating on the roaring party going on next door.

If you want to make language A or B more popular and better accessible when it comes to web hosting, write the killer app in it that nobody can do without, and which can't be implemented in PHP. That should be simple, since PHP sucks so much, right?

Lastly, is the HN code nice? I wouldn't even know, it's that irrelevant. The HTML it puts out sure is atrocious, but even that doesn't matter.


> A nice language makes for shorter, more expressive code, sure, but that's like having a fast car that handles well; it still matters more where you're driving it.

An f1 racer driving an f1 car will always beat another f1 racer driving a beetle.

Plenty of killer apps use other languages- Instagram, Pinterest, Quora, and Youtube, for example. Google certainly wasn't written in php.

Matter of fact is, facebook has spent millions of dollars trying to change languages, trying to make php behave, trying to make php faster. Wikipedia is nice, but I bet they'd be able to serve even more people if they based used a better language.

HN code is probably nice. The HTML is just the surface of the architecture sites like these run upon.


> An f1 racer driving an f1 car will always beat another f1 racer driving a beetle.

Which is nice when you're having a race, but rather useless when you don't.

> Plenty of killer apps use other languages- Instagram, Pinterest, Quora, and Youtube, for example. Google certainly wasn't written in php.

Those are't apps in the sense that you can install and modify them, are they. The fact that youtube exists does nothing to drive Python adoption. Sure the same can be said for Wikipedia, but not for MediaWiki.


There are... Just so many open source web applications that aren't written in PHP. So, so many.


>> An f1 racer driving an f1 car will always beat another f1 racer driving a beetle. >Which is nice when you're having a race, but rather useless when you don't. I was driving a point using the analogy previously used. I think trying to write a php app is like trying to drive a beetle, when you could be using a transformer- It's a robot when you need it to be a robot, and it's a car when you need it to be a car.

> Those are't apps in the sense that you can install and modify them, are they. >The fact that youtube exists does nothing to drive Python adoption. Sure the same can be said for Wikipedia, but not for MediaWiki.

If you're gonna say that about youtube, the same should be said about Facebook. With python, at least we have Django, Pyramid, Bottle, Flask. All of which are good open-source platforms that allows you to quickly get a web project going(not just a wiki), and which do a lot to drive Python adoption.

> There are... Just so many open source web applications that aren't written in PHP. So, so many. That was just an example of apps written in python. The comprehensive list is much, much larger (though I thought that was implied).


>And who cares about that, in turn?

Anyone who has to maintain bad PHP code, for starters.


I see more people complaining about maintaining bad code in other languages than I do about maintaining bad code in PHP. I personally have been a PHP developer since 2001, I haven't maintained any bad code... Actually, I spent a good portion of my early career completely rewriting shitty PHP code to be good PHP code.


> I haven't maintained any bad code...

>I spent a good portion of my early career completely rewriting shitty PHP code to be good PHP code.

I'm curious what you think maintenance is.


Rewriting the system from the ground up, not maintaining the current code base. Sorry I wasn't so exact on that.


Code maintenance (of good code or otherwise) is a sign of success. Rewriting everything is not.


If any other programming language was as popular, there would be just as much bad code in it. Nothing about PHP forces you to write bad code, nothing about other languages forces you to write good code.

Also, if PHP is really just sucky and offers no advantages, why not simply rewrite it in a better language? Surely the costs would ammortize quickly.


I don't dispute that people will write bad code in any language. The problem I have with PHP is that it at best, makes it exceedingly easy to write bad code, and at worst has actually encouraged it (see, for example, magic quotes).

I also am not claiming that PHP offers no advantages. Certainly it has some good things about it. The choice to allow you to easily interleave PHP code with HTML is an example of a simple feature which makes life really easy when you're setting up a site.

But rewriting in a better language is not necessarily a viable option. It's generally not the call of the person tasked with maintaining it, and even if it is, "cost will amortize quickly" isn't necessarily good enough on a large project with limited funding.


> actually encouraged it (see, for example, magic quotes).

Actively discouraged for years, and removed completely over a year and a half ago.


Yes I know, I was just pulling out a random example that came to mind. Still, you'll find a lot of code out there running on old versions of PHP with magic quotes enabled.

And that's another part of the problem: the incorporation of really bad ideas that end up poisoning code bases for years to come, simply because they weren't properly vetted before being released.




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

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

Search: