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

it's interesting to read the comments here. Most of them go on bashing PHP because it's a terribly designed language. They're probably right, but they're totally missing the point, primarily because this is a very technical community.

I'm not a programmer. Yes, I can solve problems with code, I can whip up a webpage, I can talk to a database, I can use Jquery. But I don't know what lambdas are, I don't understand what LISP macros are all about, and I wouldn't know where to begin writing image recognition software.

But you know what? I get stuff done. And PHP helps me do it. Because I can make things without worrying about not having a CS degree, not caring how a compiler works and not having to set up a server from scratch.

If you look at all the sites out there making money and getting views I think you'll find that an awful lot of them are made by people like me.




And guess what, you'd get stuff done more quickly and with less annoyances and bugs if you were using another language. The article is encouraging people to start programming with PHP. This is bad advice, because there are better options. If you already know PHP and you don't plan to program a lot, then learning a better language may not be worth it and staying with PHP is fine. If you're just starting you have no such investment and you're better off learning another language which is both easier to learn and more productive.


And what exactly prevents you from getting stuff done using other tools? Are you saying that only PHP let's you get stuff done?


What I'm saying is that if you're not a programmer and need to get things done PHP is a great fit because it's so easy to just do it.

I looked at python because it's supposed to be relatively easy to set up. But you need to understand compiling, importing classes, etc. just to get a simple HTML page up and running. With PHP you install apache, create a file and you've made something.

This quip from the article explains it well, and is exactly how I started using PHP:

People come to PHP because they have some problem and they need to solve it. This is what PHP really shines at. You can simply take your static HTML website, add a simple <?php include 'counter.php'; ?> in there, and … be done!

From there you start writing simple scripts, learn how to process forms, how to talk to the database, etc. After some time you start using object oriented programming and maybe make use of some framework.

That’s actually pretty much how I got into programming.

With most other languages it is the other way around. With them you first study computer science for five years and then you go out into the world to find some problem you can solve. (You could say that PHP is a programmer-producing language, whereas most other languages are programmer-consuming.)


Ok, I may have to agree with you there. There is definitely a measure of 'getting something working' that you may not get anywhere else.

Although I disagree with the last paragraph there. If you think PHP is ok, then maybe perl would suit as well. I know there are a few perl frameworks, but not sure if they are as quick as PHP.


But you do know what a function is? Or a class? Or an object? It is not like those are non-trivial already or that knowing what a lambda is needs years of studies if you understood these things.

The fatal flaw in the "PHP is simple"-Argument is that its actually not simpler than other things (I wouldn't say that its harder either). Sure, it gets stuff done (tm), but so do others, also without any deep knowledge. They may not be Lisps or Haskells, but Ruby and Python are coming close.

The problem I have with the PHP community is that "its so easy to start" seems to be their main argument. Wouldn't the world be a better place if we had an easy to start stack _without_ a shitty language?


The problem is that any popular "easy to start" stack attracts people who have no idea how little they understand. And then they start building things badly because they don't understand. Some of it proves useful to other people who don't know what they are doing. And before long the ecosystem built around that stack becomes a horror to behold.

This has happened with PHP. It happened with Ruby on Rails. (Before disagreeing with me, think about how much abuse of monkey patching happened, and how many have been bitten by it.) It happened with Perl back when Perl CGI scripts were the de facto standard.

So yes, it would be wonderful to have an easy to start stack that is popular that guides people towards doing the right thing. But human factors guarantee that any that get popular will go downhill over time.

(I've ignored the obvious argument that the same features that make you popular also make you worse. See the famous essay Worse is Better about Lisp vs C for context.)


Wouldn't the world be a better place if we had an easy to start stack _without_ a shitty language?

Yes, and I hope someone will build it!




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

Search: