F
F
Frip2015-07-04 17:55:55
ruby
Frip, 2015-07-04 17:55:55

PHP, python, ruby. Do they perform the same functions or not?

Got a question. These languages ​​are used for the same thing, or they differ in some way (not in terms of writing, but in the final result).
And what language is better to choose. Does it make sense to master php, or is python/ruby better right away?

Answer the question

In order to leave comments, you need to log in

9 answer(s)
S
Sergey, 2015-07-04
Protko @Fesor

Does it make sense to master php, or is python/ruby better right away?

If you immediately know that after PHP you will go to Python / Ruby, then it is better to immediately use Python / Ruby. With PHP, it's easier to go to Java/C#.
but in general it would be very nice to learn two options from your list. Or at least try at least two (and preferably all three). Since Python and Ruby are somewhat similar (Ruby was created under the influence of perl and python) and learning python is somehow more pleasant, I recommend trying PHP and Python. And there already to think.
My subjective opinion about the places of each of these languages:
- Ruby - rapid development, prototyping, projects with simple business logic
- Python - automation scripts, research, science-intensive calculations and all that (very large selection of high-quality libraries on this topic).
- PHP - there are two worlds, one is wordpress and all that, the other is WEB applications. PHP7 is coming out soon with typing for scalars, they want to shove structures, in a word, PHP is moving towards C # rather. And since the object model is similar to Java / C #, then all the literature for these languages ​​\u200b\u200b(and there is a lot of good literature) for PHP is also valid, which is easier in terms of learning. That is, of the three options for something complex, I would choose PHP. And for something simpler and under the web - rather Ruby.

R
Rikcon, 2015-07-04
@Rikcon

Python is the most versatile among them, you can write a gui to the program on it (in php, too, but better not).
I won’t say for ruby, I didn’t pick it.

Z
zooks, 2015-07-04
@zooks

PHP is Web-enhanced, but has its drawbacks.
Python and Ruby are more versatile languages ​​- they can be used in several ways.
For example, Python is used for computing at NASA, many educational institutions recommend it as a first language (to replace Pascal).
The ideology of Ruby is the maximum convenience for the programmer. I would start with them.
Look in this table for a comparison of the syntax of languages, select the appropriate one.
hyperpolyglot.org/scripting

O
Oleg Gamega, 2015-07-04
@gadfi

If you are looking for the very tool that is better than others, then there is no such thing, if there was, then everyone would write on it.
Choose what you like, they all have their pros and cons.
By the number of vacancies and the community in the area:
1 php
2 python
3 ruby
​​By the speed of development (conditionally, a lot depends on the curvature of the hands and the task):
1 ruby
​​2 python
3 php
Easier to maintain code written in (also very relatively):
1 python
2 php3
ruby
All of the above is not true in the last instance, it all depends on the developer, none of the languages ​​​​is the killer of the other, or of any other not included in the list, no matter who tells you otherwise. You can code in any language, just as you can write smart, concise code.
Yes, php provides more opportunities for bydlocking, it even encourages many novice developers to do this, but this is not a problem with php, but with its low entry level
Yes, python is more concise and strict, and also contains a number of goodies compared to php, and the entry level is not much higher because of this, many offices switched to it, but you can also cheat on it
Yes, ruby ​​has amazing capabilities, many people love it for its metaprogramming goodies, they allow you to develop applications quite quickly, but they also give off magic that complicates code support, which is why many abandoned it (yes, the very case when the pros and cons are different facets of one and the same )
I deliberately bypassed performance, if you don’t write applications at the vk / tweeter level, then often this is premature optimization, and if you write then the architecture, patterns, deep knowledge of databases, etc. will come first .... knowing all this change language is not a big problem.
PS for now, python is optimal for me ─ I don’t like php (there are no objective reasons for not loving it), since I’m not a web developer, then ror is too much for me ... I’m not ready to spend so much time on it, python is a kind of compromise

T
timoo, 2015-07-04
@tomcat1911

I write in ruby.
Take Python, as the most versatile.

M
Marat Amerov, 2015-07-04
@amerov

Well look, conceptual basics of php - templating, string splicing...
php is not recommended to start learning how to program, as it has many problems in design as a language,
such as case-insensitive function names.
I recommend learning Python and/or Ruby first.

W
whunter, 2015-07-06
@whunter

It all depends on the specific tasks. One is good in some ways, the other is good in others. You did not specify what exactly you want to do, but you ask what language is better to learn. Better for what? This will be the answer for you. And another holivar on the topic "the coolest YaP" will lead us somewhere in the direction of asma.
The developer always considers in what situation to use this or that approach. PHP, JS, Ruby, Python, Go.. [100500 more options] are just tools, learn what is closer \ like \ more convenient.

A
asd111, 2015-07-09
@asd111

In addition to python, everything is decaying. Python is very relaxing and pleasing to the eye.

S
sulla, 2015-07-12
@sulla

for the variant in Ruby from PHP - simple and clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question