Live data from Hacker News

PHP needs a vision

news.php.net

91–100 of 182 posts

Re: PHP needs a vision

#91
post #38

Some of the statements there such as this really disappoint me. "PHP is what people use to get their first site off the ground. PHP is what a web designer learns when he/she wants to go into programming. PHP is what a random Joe uses when he needs to whip up a page and he's in "do it yourself" mind." PHP is a great language in that its very flexible and quick to get going with, the sad thing is people don't want it t…

Facebook hates PHP, but it would be too expensive to convert their 3 million lines of code. They just use HipHop to compile it to C++.

A totally reasonable reply (kind of expected someone to say it!) but the fact that they use php (despite the use of HipHop, which is a wonderful innovation) does say something about the language.

It just makes me sad that rather than saying "look what php can do with some work!" and doing something to head in a direction that could make some of its power uses (like FB) love/like the language, the people in charge simply seem to not care.

A better positioning would be saying something like "php is a great tool to start a web project in, and over time it'll continue to be the best tool to start a project in by helping people innovate even faster." Building it into boxes and decouple it from the rest of the code down the road, like FB have, is likely what most people will do, but at least saying PHP strives to fit this need would be a better vision than saying its for "Joe's weekend website", when clearly that's just shortsighted.

Saying what you're going to do in a public place does increase your chances of following through with it. PHP should document something that says what they want to be, even if its not what some people want them to be!

Re: PHP needs a vision

#92

I come from a C++ background, and early last year tried my hand at web development. After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time. I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludg…

I don't do much PHP anymore but I can see the appeal coming from a c/c++ perspective. When I was doing PHP I felt closer to the metal than I feel with Python now.

A lot of the PHP libraries looked like thin wrapper over well known c libraries. Instead of shoehorning everything to make it PHPonic, the function calls were similar to their c counterpart. You could sometimes even read the man pages for the c libraries if you needed extra details on how the internals worked.

There was a simplicity to this that was appealing to me. The lesser amount of magic and abstraction meant I could more easily visualize what was happening under the hood and find bugs quickly.

Re: PHP needs a vision

#93
post #57

Earlier quoted context omitted.

PHP works fine as long as you're never exposed to a better way. In a year or two start using rails. You'll come back to PHP and wonder why anyone would ever make a hammer with two claws.

You're confusing a language with a framework. A more apt comparison is rails with symfony2 or zend framework2.

[deleted]

Re: PHP needs a vision

#94
post #80

Earlier quoted context omitted.

[deleted]

I can't tell if you're trolling or simply ignorant about what the language actually currently is. PHP4 => PHP5 was a huge change, even more so if you compare PHP3 with PHP5.

[deleted]

Re: PHP needs a vision

#95
post #11

Earlier quoted context omitted.

Personally I find nothing much 'general purpose' about PHP. The language has configuration files! That alone prohibits me from doing anything generic with it. So all that's left for me is 'focus on web development'. And to be honest: I think today it is not even so good at that. We have server side JS (Node), Ruby, Python and Java -- all freely available with huge communities. Does PHP stack up against these today? I…

> We have server side JS (Node), Ruby, Python and Java -- Hey now. Let's not forget everyone's first love: Perl. :D It's still quietly running quite a few big sites out there, and is currently enjoying something of a renaissance with frameworks like Mojolicious & Dancer, not to mention the releases of 5.10-5.16.

Perl does maintain a strong niche but if the Perl 6 announcement in 2000(!) had been that all focus was shifting to web development Perl would today be king of the heap. It was web development that pushed PHP and Ruby into the spotlight over the last decade, and the 2000ish Java focus on web frameworks also helped keep it popular.

Re: PHP needs a vision

#96
post #43

Earlier quoted context omitted.

"I find nothing" is a fairly strong statement. There are plenty of general purpose scripts one can write in PHP. Also config files don't preclude 'general purpose'. For example, run anything in Java and you'll find out there are plenty of defaults running on the JVM that you can override. Yet no one would argue Java isn't a general purpose language. The fact that PHP keeps these defaults in a file is inconsequential.

How is that a fairly strong statement? Here's a much stronger one: PHP is terrible at being a general purpose language. General purpose language doesn't mean you can do things that aren't web dev in it. General purpose means that it is designed to be useful in any application. You know like Ruby, Python, or Perl. General purpose doesn't mean that those things are possible (because I agree that they are possible in PH…

I use PHP often for non-web things all the time… I write shell utilities all the time in PHP because it just makes sense: a simple interpreted language, with full access to my app's configuration, database access, dead simple file IO…

The one-liner's are quite nice too… Just today at work I needed to come up with a base64 encoded json string from a data set in an ini file to pass into my Java app via stdin. It was something like:

    php -r 'echo base64_encode(json_encode(parse_ini_file("app.ini")));' | java -classpath Foo.jar com.example.foo.App 
So… yeah. I don't think it's fair to say that "PHP is terrible at being a general purpose language". You just haven't done enough of it yet to appreciate it.

Re: PHP needs a vision

#98
post #15

Earlier quoted context omitted.

On a more positive note: I think the Symfony team actually has the vision: provided it has to be with PHP, let's make a full stack web development framework (like Rails) that does not suck, and create heaps of interesting components/libraries that can be used perfectly on their own in the process! These guys and girls are showing to what extend PHP can be pushed, they also build a fair share of general purpose libs t…

have you ever even tried Symfony? i think a lot of the debate is about how people are starting to get fed up with the Java/c#-like direction PHP is heading. symfony is not like rails, no where close to it. not sure exactly where they started taking the wrong turn but it's really going the opposite direction from other languages like node/python/ruby where simplicity is at it's core.

You nailed it. Symfony == Poor man's Java. Which is ironic because even Java has started to move to move to something more sensible with frameworks like Grails or Play.

Re: PHP needs a vision

#99
post #81

Earlier quoted context omitted.

How is that a fairly strong statement? Here's a much stronger one: PHP is terrible at being a general purpose language. General purpose language doesn't mean you can do things that aren't web dev in it. General purpose means that it is designed to be useful in any application. You know like Ruby, Python, or Perl. General purpose doesn't mean that those things are possible (because I agree that they are possible in PH…

Why is it a crappy tool for non web stuff? It has an absurdly large set of included tools and having all of that in one place is really handy. More concretely- what's an easy non-web task that Ruby (as you suggest learning) is great at that PHP can't handle just as easily? Not trolling here, I'm genuinely curious.

I find the guy to whom you're replying to be obnoxious, but he's not wrong about it being poor for CLI stuff. Loads of stuff non-obviously behaves differently in a web context versus a CLI context (and while it's documented, you still have to know about it). It doesn't have good stream processing facilities. It, as mentioned, requires a php.ini and requires you to think about that when you're writing scripts in it.

It can be done. It is not something I would recommend under almost any circumstances. (But, then, I wouldn't recommend Ruby for any-any circumstances, so...)

Re: PHP needs a vision

#100

I come from a C++ background, and early last year tried my hand at web development. After hearing about all the stuff about how PHP was an "old", kludgey language, I tried to learn python, and go the webpy. It was doable, but I kept running into issues all the time. I gave up and switched to PHP, and I have to say that it was a much easier experience. For the most part, everything just worked. Regardless of how kludg…

The problem with php is that is scales terribly with the size of the codebase. Try to move away from the comfort zone of the language and the size of the project and it changes a lot.

The opposite, actually. PHP's shared-nothing architecture makes scaling a breeze. Just add more hardware.
Post reply on HN