PHP vs Python and Ruby
In recently time, I more and more listen, that Ruby or Python are bests languages that PHP.
I interested this is correctly? If yes, to tell least one example.
"Python (or Ruby) can "something", but php cann't this, so, php is worse!"
Please tell this "something".
Its wonder, 101 viewing and 0 answer, why ?
It's not an easy question. Most people will specialize in one language, and have only a passing knowledge of others. Very, *very* few will have solid knowledge in all three.
On top of that, linguistic preferences are rarely formed objectively. Taking PHP and C# as examples, I don't prefer PHP necessarily because it is "better" than C#, though I might at times claim it is. I likely prefer PHP because it suits my current coding preferences better: I can code efficient PHP more efficiently than I can code efficient C#.
As a general trend, I might also say that PHP sites feel faster than C# sites. But, I don't have concrete numbers to back that up. Nor do I have a firm understanding of the complexities of each site so as to make an accurate comparison. Perhaps simpler sites are just built using PHP, and more complex ones with C#.
If you're looking to get started with a new language, just pick one that's highly popular. Popularity generally ensures a good degree of community support (like this forum). But, be quick to respond to changes -- had you posed the question 10 years ago, I'd unequivocally recommended Perl. But, if you're still writing Perl today, you'd be wise to abandon it for web development purposes.
In terms of popularity, PHP runs circles around Python and Ruby.
In terms of popularity, today PHP unequivocally is #1 and i dont understand why people say, that ruby better php? I dont understood this.
Well, thanks for answers.
Ruby is a more modern and elegant language than is PHP. That's why some people say it is "better". Being a more consistently object oriented language, Ruby has productivity benefits if you have a good understanding of OOP.
Originally Posted by dadli
But PHP is much more popular, and this means
- more people know it
- more add-ons (e.g. WordPress) available
- it's on more servers (a low cost host service will likely have PHP but might not have Ruby) - possibly the most important issue here
My impression is that PHP is better for simpler projects and Ruby better for larger projects.
Learn all three, though you don't need to become an expert in all three -- at least not immediately.
Once you know language A, learning language B not only means you know a new language, but it gives you insights into the strengths and weaknesses of language A while also teaching you new ways to think about programming in general. You may continue to use language A as your primary tool, but you'll now be better with it as well as able to switch relatively easily to language B should the need arise.
Also, the more languages you know, the easier it becomes to learn new ones when you need to.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Ruby and PHP both surfaced in 1995.
Originally Posted by handcraftedweb
And I wholeheartedly disagree with the assessment that Ruby is any better for more complex projects, or that PHP is in any inadequate for complex applications. Facebook, for instance, is written in PHP.
At this point, my default is using classes in PHP. Looking at somebody's code that is written in a procedural way just kind of makes me shake my head.
Originally Posted by handcraftedweb
Originally Posted by spufi
That said, if you're in the mood to write some strictly OO code, C#/.NET is a good route to go. It's a robust platform with a great deal of community support, it's fantastic for building and consuming web services, and it's in very high demand. And perhaps more importantly, it makes OO code make some degree of sense in a typically stateless setting by fabricating state! (Lots of overhead for doing so, though.)
Of course, my recommendation for C#/.NET comes from a lack of experience with Ruby. It's possible that Ruby performs some similar horrendously inefficient and clumsy state fabrication ...
I've already downloaded MS Express and took a quick glance at C#. It's my eventual goal to finish off my degree in CS with focusing on .NET. I really liked what I saw during my testing out phase. I just need to get some other stuff done and out of the way before I can start tackling it full force.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)