A
A
aPilot2015-12-22 17:54:06
Programming languages
aPilot, 2015-12-22 17:54:06

What is the difference between PHP, PYTHON, RUBY programming languages?

What is the difference between programming languages ​​​​such as PHP, PYTHON, RUBY (maybe there are some more popular ones, but I have heard a lot about these).
1. Is it possible to draw an analogy with them for cars, for example, an off-road jeep, a sports car for the autobahn, etc. the same languages? If yes, which one for what?
For example, you can make a social network like VK in any language or not. Or the functionality of Sberbank online.
2. For the user, will any difference be visible externally in what (in what language) is the service made?
3. Maybe in some language there is something that cannot be done in another. Maybe someone knows examples of what can be done in Ruby and not in PHP and vice versa or with other languages.
4. If we assume that a person knows all 3 languages, then based on what thoughts will he do something choosing a certain language - time, money, personal preferences, or does it follow from the task (if each language is for something specific).
5. If you take all the knowledge of each language, how will they be located along the ladder. For example - php 3 years of study, Ruby 5 years of study, c++ 10 years of study.

Answer the question

In order to leave comments, you need to log in

10 answer(s)
S
Stanislav Makarov, 2015-12-22
@Nipheris

1. It is not worth drawing an analogy with the languages ​​themselves. An analogy should be drawn for platforms.
Platforms like .net and java that were developed for the enterprise are, of course, better suited to it. And it doesn’t even matter if you have a desktop application or a web service. It is important that the platform supports the necessary standards and technologies with a quality guarantee from the manufacturer.
On the other hand, many components of such platforms are closed-source.
Therefore, if you are not a bank, but a startup, then choose Ruby or Python for a web service .
A social network can be made on a lot of things, but I would do it on rails or jung. But I would do the Sberbank-online functionality in ASP.NET MVC (i.e. in C #) or in Java (in spring, for example). However, the same Blizz battle.net is written in spring (the server once accidentally gave me a stack-trace after an error).
Although, IMHO, some key design elements of the language still affect the possibility of its use in large projects. For example, I find it much easier to write large projects in a statically typed language. However, this is a very tricky question.
2. No, it won't. It shouldn't be, to be exact. For the user, the language of communication with the service is HTTP. If a modern web framework can't properly abstract away the underlying technology, it's a bad framework.
3. There are a lot of things you can't do in PHP. Or rather, HOW everything is possible, but normally only the web is possible. That is why for me it is not a language, but some kind of template engine - it has too bad history and connection to the web (which is not good for a general-purpose language). Of course, modern web frameworks comb it very well, that you can even work with it, but we are talking about languages ​​..
4. For web projects between Ruby, Python and PHP, a person would choose based on their skills. Each language has its own ecosystem (libraries, package managers, application servers / web server plugins) and it's quite difficult to know everything at once. That is why everyone goes to their camps and just works. The primary choice of a language often determines its popularity. About 5 years ago, Ruby tore everyone at the expense of Rails, today Python and PHP have pulled themselves up in terms of the ecosystem, so the situation is already different.
If a person has managed to get acquainted with different languages, he will choose the one in which it is easier for him to think. The OOP model, static / dynamic typing - all this determines how a SPECIFIC person feels from a SPECIFIC language.
5. PHP learns the fastest, but if you don't know other normal languages, don't learn it - you'll be spoiled as a programmer. Python and Ruby learn about the same. Learning C++ is a completely different story, I would not put it on a par with Python - this language is on a slightly different level and requires a different (deeper) knowledge of computing (i.e. it 100% learns longer than Python).

A
Alexey Cheremisin, 2015-12-22
@leahch

There is also java, go - they are also very popular.
And on that and on that wonderful things are written!
Go is very easy to use - almost like a C/C++ replacement, only faster to develop. Strongly gaining popularity, low-level enough to write system utilities and large distributed systems on it. It has its cons (a debugger, for example), but it also has a lot of pluses (a debugger is rarely needed).
Java is a separate issue, it is very convenient to write very large projects on it, but the entry curve is very high. The language itself is quite simple, but knowledge of frameworks (libraries) is exactly what the employer pays for, and very worthy money. This, I will not lie much, is one of the highest paid and cost-effective programming languages.
As for PHP, the language was originally created for simple projects for the WEB, as a replacement for CGI, but it seems to have grown, objects appeared ... But, it does not develop further than the WEB.
As for Ruby, it's a good language, a great infrastructure (foymworks/libraries), a lot of things have been written, a lot of commercial and government sites, such as the portal of public services in Moscow, if I'm not mistaken. The interpreter is a little slow, but this is not a reason not to take it. In my personal opinion, the main inconvenience is the constant search for the required version of the library when rebuilding the project.
Python is a great language, very rich infrastructure, lots of commercial uses. You can do big, very big projects on it. Very easy to learn. I prefer to quickly prototype something in python, and then I don’t want to rewrite it.
I myself program in Python, C, Java, PHP.
I am relatively well versed in Ruby and Go, at the level of getting into someone else's project and correcting a mistake.
My favorites are Java, Python. I'm looking at Go.

O
OnYourLips, 2015-12-22
@OnYourLips

1. Is it possible to draw an analogy with them for cars, for example, an off-road jeep, a sports car for the autobahn, etc. the same languages?
Definitely possible.
The language should be chosen based on the area in which you work.
For example, you can make websites in C ++, but no one in their right mind will do this.
2. No.
It doesn't matter . Because you should not use the language for what it is not the best tool for.
4. If we assume that a person knows all 3 languages, then based on what thoughts will he do something choosing a certain language - time, money, personal preferences, or it follows from the task (if each language is for something specific).
From task.
5. If you take all the knowledge of each language, how will they be located along the ladder. For example - php 3 years of study, riba 5 years of study, c++ 10 years of study.
First language - 5 years of study (together with the technology stack). Second and subsequent languages ​​and their technology stacks - 2-3 years.

Y
Yuriy Ivanov @Yuriy, 2015-12-22
Ivanov

1. PHP, Ruby on rail are languages ​​for the server side of websites. Python is most often used as a scripting language. When it comes to choosing a language for sites - start with php - it is the most popular. And then everything will depend on personal preferences. Someone likes ruby's mvc, someone likes .net. You can't compare to a car. Any project can be implemented in any language.
2. You can make it so that the difference is not visible.
3. Everyone can do everything.
4. Depends on the task. If it's a web - will write in your favorite language for the web.
5. Any language can be mastered in a basic way in a month or two. Further depends on diligence and desire to develop.

E
Eugene Burmakin, 2015-12-22
@Freika

If we talk about the differences between PHP, Ruby and Python, then first of all, the differences are in the syntax. If Ruby and Python have a neater and more readable syntax, then PHP is the ugliest here.
Next, Ruby is a completely object-oriented language. PHP - no, it has OOP implementation, but it's still not as good as in Ruby (I can't say for Python here, I wasn't interested).
Community. The PHP community is large due to the minimum entry threshold (Russian language is usually limited to sending to the documentation, perhaps my experience in this matter is outdated). Ruby has a small but responsive Russian-speaking community. English speaking is excellent. Again, I can't speak for Python.
An important point: in Python, you can write web applications, server and desktop applications for different operating systems. With Ruby, you can write web applications and server applications. The desktop is worse. In PHP, you can't even write a daemon for your web application, because the web is the only realm of PHP. Attempts were made to adapt it to other purposes, but so far nothing good has come of it.

M
MetaDone, 2015-12-23
@MetaDone

1. If we give an analogy with cars, then php is a motor boat. Of course, you can pervert and ride along the road on this boat, but why? A boat is needed for sailing on water, that's where it's good on it.
And python and ruby ​​are such pickups that also have boats in the trunk (rails, django, etc.)
And when you need to cross the water, you need to get out of the pickup and transfer to the boat.
2. If everything is fine, but no.
3. There is no easy implementation of OpenCV in php, there is in python, but the task is not very common, in most cases you will not encounter such restrictions on the web
4. Most likely the one who knows best. But the task also makes its own adjustments - for example, it is more convenient for me to write for Selenium web-driver in python, although there is also an implementation in php.
5. Depends on the person and what he already knows and general ability to build complex abstractions. If a person cannot think of more or less complex algorithms, then, accordingly, it will take much longer to learn, and maybe nothing more complicated than bash scripts does not implement

A
asd111, 2015-12-23
@asd111

The site can be written in any of these languages.
The easiest is Ruby/Rails and Python/Django.
There are a lot of cool libraries in python that are not available for php and ruby ​​- for example, tensor flow (google's library for neural networks) is only available for C ++ and python.
The python syntax is simpler than ruby ​​and php.
Python is used by yandex, google, etc.

E
Evgeny Ivanovich, 2015-12-23
@makrushin-evgenii

Personally, I have no experience in all three languages, but the questions seem obvious, and therefore I decided to unsubscribe.
python - SUV. It is a general purpose language that supports several programming paradigms. In addition to the rich standard library, there are thousands of libraries. There is simply no task he can't handle.
ruby is an expensive sports car. Rails has a very high development speed.
php is a reliable special transport. Has very good documentation and twenty years of FAQs. Only nowhere except the web is not used.
Will not. But if there is not one user, but let's say a million, then the difference between Ruby and Erlang (Elexir) will become obvious.
In python, you can "a, b = b, a", lol
And they even made sites on FASM (but why?)
4. If we assume that a person knows all 3 languages, then based on what thoughts will he do something choosing a certain language - time, money, personal preferences, or it follows from the task (if each language is for something specific).
This follows from the task at hand.
m.forbes.ru/article.php?id=7255

A
aPilot, 2015-12-24
@aPilot

As a result, sites can be made in any language, but I won’t learn everything or hire different developers.
Where does it stop anyway?
Basically, there are 3 types of sites in the network - shop, service, articles.
So which language to choose for everything or which one for everyone???
Now I'm leaning towards Python. most say that it is universal and can do anything and is simple.
You can also try Go purely for curiosity.
PHP is more common and it is correspondingly easier to find developers, and it’s suitable if the site is not a large business card type of a company.
Fish - why? if there is python...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question