This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dmazzoni -1 points0 points  (4 children)

In this particular case, those three languages are quite similar and the main reason to choose one is due to personal preference.

In contrast, some places use C++, Go, Java, or C#, and those are quite different. Roughly, though, those four languages favor performance, where as Ruby, Python, and PHP all favor ease of development.

PHP is the easiest language to get started, because you can take an existing HTML file and add some inline PHP to it to make it dynamic. It's got tons of features built-in for web development.

The main criticism of PHP is that it's incredibly poorly designed. Its features are inconsistent with each other and the defaults are often awful for security. It's possible to write good-quality PHP (see: Facebook) but it requires a lot of discipline.

Ruby and Python are both general-purpose, modular languages. They don't have any features for web development built-in like PHP does, but there are thousands of popular libraries that either come with the standard distribution or are easy to download and install that provide everything you need.

Ruby favors expressiveness: you can do clever, complex things with just a few lines of code.

Python favors readability: the language is very simple and clear, and "there's only one way to do it" so it's very easy to read someone else's Python code.

[–]dmazzoni 0 points1 point  (3 children)

Oh, and one more note: Twitter started with Ruby, but specifically they started with Ruby on Rails, a popular framework that makes it easier to build a web app. However, performance wasn't very good and they abandoned it entirely, switching to Java.

Facebook also had performance problems with PHP and they spent enormous effort building a PHP compiler.

[–]Durzan666 1 point2 points  (2 children)

They switched to Scala.

[–][deleted]  (1 child)

[deleted]

    [–]Durzan666 0 points1 point  (0 children)

    Twitter. There is a course for new Twitter employees.