3

In a recent blog post by Roy Osherove, it is pointed out that his switch from primarily .Net development to ruby development has seen a huge difference in community involvement and really enjoys it.

The quote that spawns this question is :

there is no master overlord that dictates what you will or won’t work with.

I don't spend a great deal of time working with php, but I do spend about the same amount of time working with ruby. From the time that I spend working and communicating with people who work with both technologies it seems like Ruby has the feeling Roy describes much more than PHP does.

I don't deal with Python a great deal, but those I know who do all say it has a similar community feeling.

This strikes me as odd since every ruby and python programmer I know tend to have learned php somewhere along the way but they have no similar feeling about the php community.

I understand there are justifiable complaints with earlier versions of php, but people were still able to use it to build some very large sites and many companies use it.

What separates these communities that ruby and python seem to have such a different vibe compared to php?

(This question could be subjective but I'm hoping there is a solid impartial answer to explain the difference)

sclarson
  • 404
  • 2
  • 5
  • 9
    Ruby and Python are currently cool. PHP isn't. In a few years time you'll be asking why *Fnorgle* has such great community involvement while Ruby and Python don't. – Carson63000 Jul 06 '11 at 05:53
  • 4
    A *lot* of people use PHP by choice. Its a very productive langauge. That there's a lot of crap code out there written in PHP by amateurs isnt an issue to the applications professionals develop. – GrandmasterB Jul 06 '11 at 07:27
  • 3
    @Carson: no, you won't. In fact Python is much older than PHP, Ruby is exactly as old as PHP. – vartec Jul 06 '11 at 11:18
  • 1
    Ruby tends to attract intelligent and active developers, not sure why exactly but I have my opinions on this. I have never met a bad Ruby developer but I have met more bad PHP developers than I can count. – maple_shaft Jul 06 '11 at 11:18
  • @GrandmasterB, I like PHP for simple web scripts that I can throw up on just about any web server. It would take me at least twice as long to throw up something simple in Java or Python. With that being said I think you are downplaying how badly the majority of the PHP community reflects on the public perception of PHP in general. – maple_shaft Jul 06 '11 at 11:21
  • @Grand: PHP can be productive, but it will never be as productive as Python and Ruby. @maple: I can assure you that you can build web applications faster for example with Django. – vartec Jul 06 '11 at 11:29
  • @vartec, I am a Python beginner, still getting used to it. I think that curly brace languages have turned my mind to jelly :) – maple_shaft Jul 06 '11 at 11:34
  • @vartec: age is irrelevant. Ruby and Python are cool now - much cooler than they were when they were new. In a few years time, they won't be cool. They might be widely used and well liked, but they won't be *cool*. – Carson63000 Jul 06 '11 at 11:34
  • @Carson: Python and Ruby are way past the hype phase, which was around middle of past decade. Currently hyped languages are Scala, Erlang and server-side JS. But it didn't make Python nor Ruby passe, they are still very popular. – vartec Jul 06 '11 at 11:44
  • @vartec Is Java cool? 15 years ago it was. Now it may as well be COBOL. If Python and Ruby are anywhere nearly as successful they will share the same fate. – Jeremy Jul 06 '11 at 14:06
  • @Jeremy: Ruby is 16 years old, PHP is 16 years old, Java is 16 years old, Python is 20 years old. So I don't quite see your point. – vartec Jul 06 '11 at 14:15
  • @vartec Maybe you were not aware that Java was very popular 15 years ago and lots of Java code has been written? Whereas Python and Ruby still have not attained that level of popularity. – Jeremy Jul 06 '11 at 14:25
  • @Jeremy: Still, I don't see how's that on-topic. – vartec Jul 06 '11 at 14:35
  • @vartec The point is that the absolute age does not matter; there is a product cycle of emerging fad -> mainstream fad -> mainstream -> passe mainstream -> declining etc. – Jeremy Jul 06 '11 at 15:09
  • @Jeremy: ok, take for example C. – vartec Jul 06 '11 at 15:15
  • 1
    @maple_shaft, why do I care what the public perception of PHP is? I'm writing software, not running for prom queen. PHP is well suited for more than just simple scripts. There *is* a lot of bad code written in it by newbies, but that has no bearing on the code professionals write. That is, the bad code in their poorly thought out open-source programs doesnt affect how good code in professionally written applications runs. – GrandmasterB Jul 06 '11 at 18:21

2 Answers2

11
  • Both Ruby and Python have formal language definitions separate from implementations, in case of PHP you don't have language definition, just the Zend implementation;
  • Both Python and Ruby have community process run by a foundation, PHP development is mainly dependent on Zend (this is changing lately);
  • Both Python and Ruby are general purpose languages, PHP is web only;
  • Both Python and Ruby are object-oriented from ground-up, for PHP OOP support is something, that was added later and it's not in the core of the language;
  • Both Python and Ruby where designed as languages, PHP started as collection of hacks for HTML forms processing;
  • Both Python and Ruby are modular, in PHP instead of modules you have just bunch of functions in the global scope, with very inconsistent naming.
S.Lott
  • 45,264
  • 6
  • 90
  • 154
vartec
  • 20,760
  • 1
  • 52
  • 98
  • 2
    `Both Python and Ruby are general purpose languages, PHP is web only` - PHP is a general purpose programming language. Also, why do you claim PHP isn't modular? Because it contains some older functions for string manipulation that had inconsistencies with parameter order? It's inaccurate to say that PHP isn't modular, but zealots here and there will claim various things about various languages and discussions such as these won't make anyone budge. I just find it really unethical to post untrue facts. – Michael J.V. Jul 06 '11 at 09:54
  • 2
    @Michel: PHP is not general purpose. The only attempt to use it outside of web was PHP-GTK, and that failed miserably. PHP is not modular, because it has no notion of modules. `include`/`require` just adds text of file into global namespace. And BTW, you are free to post your own answer. – vartec Jul 06 '11 at 10:05
  • 1
    I dislike language comparison questions, that's why I never take part in them so I won't post my answer. PHP is a general purpose language, because it CAN and IS used outside of the web - but there are better tools for certain things. You've said that the language isn't modular, there's the API for creating actual PHP modules (in C) which lets you extend the functionality of the language itself. I'll stop here, because biased and inaccurate comments and answers will continue to pile up (not that I don't agree with most of your points, I'm just commenting on the ones I find inaccurate). – Michael J.V. Jul 06 '11 at 10:14
  • @Michael J.V. 'Web only' is a big statement, but Web is definitively a big aspect in PHP, that influenced it's syntax (which is to be embedded in HTML) and design ($POST/$GET/$SESSION dont make much sense without HTTP). Granted, in any turing complete language you can also make non-web-applications, but i guess, most of us do not have a definition that strict of 'web only'. – keppla Jul 06 '11 at 10:23
  • @Michael: modules in C as example of PHP's modularity? OMG... As for "is used outside of the web", name one non-web PHP application, that is used by more than 3 people. – vartec Jul 06 '11 at 10:25
  • 2
    @Michael Sure you can have 8-bit CPU emulated in Minecraft. You can also have web server written in PostScript (PS-HTTPD) or Bash. Still Minecraft is a game, PostScript is a page description language and Bash is command interpreter. Just because you can use can opener instead of hammer doesn't make it 'all purpose'. If it does in your book, you will shortly come to a conclusion that everything can be used everywhere with varying results. – Jacek Prucia Jul 06 '11 at 11:20
  • Wait, didn't I say that already a few times? On the other hand, yes, I can use PHP for non web purpose. I can use it to sync a few of my smaller databases. Why would I use something like C or Java for that If I can do it in PHP in 20 minutes? Why would I have to spend time on creating a daemon in [insert language] that's used for simple message queueing if I can do it in PHP in a few minutes? I mean there are tons of examples where PHP comes in handy and performs reasonably well for small-scale purpose and where something has to be coded quickly. Why such animosity, I just don't understand. – Michael J.V. Jul 06 '11 at 11:28
  • @MichaelJ.V. let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/738/discussion-between-vartec-and-michael-j-v) – vartec Jul 06 '11 at 12:34
  • Windinder is also an attempt to create desktop applications using PHP. – Yasir Jul 12 '11 at 08:53
  • @Yasir: you mean **was** attempting 5 years ago. – vartec Jul 12 '11 at 09:40
  • @vartec No. It *is* an attempt and is not dead as of yet. See http://winbinder.org/, latest release is on 2010.10.14, which appears pretty normal for a live project. – Yasir Jul 12 '11 at 11:26
  • @Yasir: so what changed in last 5 years? logo? – vartec Jul 12 '11 at 12:34
  • I used it only once back in 2007 so I have no idea. My point is that PHP not only _can be_ used for non-web purposes but _is being_ used as well. – Yasir Jul 12 '11 at 12:45
  • @Yasir: name one application used by more than 3 ppl, which uses it. – vartec Jul 12 '11 at 13:04
  • Why?! I neither developed PHP nor WinBinder and I am no advocate of any specific language including PHP. If you hate it, you have every right to do so but keep in mind that it won't change the fact that PHP is not just in web. Just for your reference here is a showcase of desktop applications developed using PHP/WinBinder: http://winbinder.org/forum/viewforum.php?f=4 Please note that I won't be able to reply here anymore. Thanks – Yasir Jul 12 '11 at 16:42
3

Common perception: Ruby and Python are real programming languages, to be named along C, C++, C#, Java and the like. PHP is something like an HTML with some scripting ability.

Active community can only really be formed by developers, and a programming language may just seem more clean and interesting to them then a "duck-taped-together" extended HTML thing, very much restricted to web stuff.

remember that this is not about facts or totally rational arguments, but about psychology/perception, which might be partly based on reality.

Python definitely is used for much more then web development. i do not know if that is true about Ruby.

hoijui
  • 343
  • 2
  • 9