Arc Forumnew | comments | leaders | submitlogin
possitives and negatives of a language
1 point by agentbleu 6077 days ago | 3 comments
I have learned through trial and error the gist of PHP, and I must say i do love it. I love the community, as in the history of classes availible from previous developers, and the code examples dotted about on the PHP manual and other places.

Yet everyone seems to love to hate PHP and LAMP, in favor of RoR, python, etc. then theres a whole plethora of others such as lisp, arc, etc.

I know many people talk about security with PHP but I don't buy that, as I can see its simply bad coding behind all the vulnerabilities.

Yet I am about to develop a new app and am interested in other platforms. Could some of you who have abandoned PHP for languages tell me what drew you away from PHP to them and why.



4 points by gnaritas 6076 days ago | link

Not a former PHP'er, but I can tell why most of us hate it. It's an ugly bastard of a language created by accumulated hacks and inconsistencies. People love Python and Ruby because they're exactly the opposite, they embody coherent styles that let you build upon what you know in a logical fashion. No language is perfect, but they at least attempt to be consistent. PHP is full of dragons hiding everywhere that just jump out bite you when make the mistake of assuming something should work a certain way. The only style PHP embodies is "whatever works", which is a shitty design philosophy.

-----

2 points by agentbleu 6076 days ago | link

Thanks for the candid words, I only have the experience of actionscript2 javascript, and php, so it is hard for me to know if the grass is really greener or if there isnt just the normal battles as seen with all new technologies.

From what you say mind I haven't had this experience, I have found it easy to grasp and lots of examples to get me on my way with nothing left out, always finding that solution to a given problem.

Maybe I should frame the question like this, what would make me enthusiastic to migrate to a RoR or pythan etc. is that they are quicker to develop with, or have lots of prebuilt functions / classes saved you much work. etc. Can you give advantages such as these?

thanks agian

-----

4 points by absz 6076 days ago | link

I don't have too much experience with web apps, but I've done a little PHP (and I've used Ruby for non-web stuff). PHP has an amazing amount of resources out there, and it's ubiquitous, which are two large plusses. But its capabilities are rather elementary, and while this can be fine, it often isn't. For instance, PHP doesn't have real closures, and it doesn't have first-class functions. (When C's functions are more first-class than yours, you know you have a problem.) You have to pass their names around in strings. Ruby, on the other hand, is a nicer language to work in--it has the things I mentioned, and even more. And when the language isn't fighting with you, you don't necessarily need as many resources; nevertheless, Ruby has them.

Javascript, though, I feel is a better language. Real first-class functions and closures, innumerable examples and tutorials (though not always good ones), and more. Its problem is that every browser understands it slightly differently.

So between PHP and other things, I feel that the difference is within the language itself, not in the modules and prebuilt things (as all of the mentioned languages have these). But working in PHP felt confining when I was using it, and that's something I took away. (It reminded me of Java in that regard—the same feeling of being confined, as though I couldn't do what I wanted to.)

-----