4 ms·
Personally I find nothing much 'general purpose' about PHP. The language has configuration files! That alone prohibits me from doing anything generic with it.
by cies 14y ago
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 sure see that back in the days, when cgi scripts in Perl were the norm, PHP had huge advantages over its direct competition in open source web dev land.
To me Rasmus merely underlines the lack of vision, or ability to act on one.
- cies 14y agoOn 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 that the PHP community badly needed (e.g.: composer). It you are looking for PHP with a vision, line yourself up with Symfony: they seem to have it. Jokingly: If web development is what PHP is useful for, then Symfony simply needs to be shipped with it :) Plenty of vision is communicated from their site, and it all makes sense: http://symfony.com/symfony-at-a-glance http://symfony.com/symfony-at-a-glance http://symfony.com/elevator-pitches http://symfony.com/elevator-pitches
- chrismsnz 14y agoCompletely agree. The people behind Symfony (and other embraced projects such as Composer) are dragging PHP kicking and screaming into the modern age. The support and tooling they've managed to come up with is great, rivalling some of the more mature languages. Definitely a good "side" to hitch your wagon to.
- jaequery 14y agohave 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.
- orangethirty 14y agoPHP is one of the major corporate web languages. That is why its heading down Java street. But that's not a bad thing either. Every language covers a specific need. They can't all be everything to everybody. Sure, there is a lot of horrible PHP code (specially in the online ads industry), but that does not change the fact that the language works for the needs of a given market. I don't get why people want to turn PHP into Ruby/Python. If you want that, then by all means use Ruby/Python. If you have to use PHP at work, then make peace with it, and use a more modern PHP style. If you are going to complain, just do it to your CTO or person in charge of choosing programming languages. Though most don't listen...
- fauigerzigerk 14y agoWhere "modern PHP style" is defined by the kind of OO frameworkization excesses that the Java community introduced to the world over 10 years ago. It's not a specific need of the enterprise, it's just a historical coincidence. PHP happened to be the language that websites were written in at a time when the old Java guard came into management positions, bringing with them their failed ideas of what "professional" software design means. I don't see why you think it is more justified for PHP to become J2EE than Rails/Django. PHP as a language doesn't support one style any better than the other. The only thing that really sets PHP apart from other dynamic languages is that it is a page template engine by default. So if you absolutely have to ask one of those "why turn PHP into xyz?" questions, why not ask "why turn PHP into anything other than a page template language?". The answer to all these questions is, because programming languages are indeed languages. People use the languages they know to say the the things they need to say and they use them to experiment with new ideas. That's a good thing.
- orangethirty 14y agoI don't see why you think it is more justified for PHP to become J2EE than Rails/Django. I don't. But like you said (IMO, your comment is spot on), PHP has suffered from the Java mindset. Though I do think that people should not have a language do everything. But thats a problem at the enterprise level, where one size fits all.
- tom_m 14y agoDon't forget Lithium. Also a great vision.
- sauravc 14y ago"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.
- olleicua 14y agoHow 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 PHP); it means that it is a good tool for any job. PHP isn't just an inferior tool for non web dev projects though, it's also barely better if at all for web dev. LEARN RUBY!
- Firehed 14y agoWhy 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.
- eropple 14y agoI 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...)
- cowboyhero 14y ago> 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.
- bitcartel 14y agoI'd say there's life in the old dog yet given that BBC's iPlayer site runs on Catalyst. On the other hand, Dr Dobbs thinks: "...Perl continues its long decline. According to Google trends, the number of searches for Perl is 19% of what it was in 2004. Its declining role in open-source communities further cements the perception that it's in an irretrievable tailspin." http://www.drdobbs.com/jvm/the-rise-and-fall-of-languages-in-2012/240145800 http://www.drdobbs.com/jvm/the-rise-and-fall-of-languages-in...
- guelo 14y agoPerl 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.