A
A
Alexander2010-09-30 11:03:27
ruby
Alexander, 2010-09-30 11:03:27

Where to go after php? Ruby or Python?

Actually the question is in the title :) I would like to hear the fundamental differences between the languages. Which tasks are best suited for what?

Answer the question

In order to leave comments, you need to log in

27 answer(s)
C
Christmas, 2010-09-30
@Christmas

Python is much faster, better documentation, more polished (in ruby ​​you can still see the html 3.2 generation library - a clear example of the fact that they can hardly manage these tens of thousands of files). Twitter, which is often shown as an example of a popular site on rails, rewrote the heaviest part in Scala, because ruby ​​itself can not cope there.
The popularity of Ruby is closely related to the popularity of Rails. When I found out about this language (2001, there was no rail yet), no one really needed it outside of Japan. Rails appeared - Ruby became an ultra-trendy language (some still can not understand that Ruby and Rails are not the same). Although now it seems that popularity is declining.
Python, all this time, has been systematically developing and popularizing more or less independently.
That's why I would lean towards Python. Ruby's forte is OO and syntax.
In general, this is all terribly subjective opinion, learn what you like best.

K
kmike, 2010-10-01
@kmike

Learn python.
It will make you a better programmer, because python
a) does not welcome trickery
b) teaches you to make the most simple (KISS) decisions, not to complicate anything The
educational aspect in python is very explicit - there is always 1 right way to do something. Very useful "brainwashing" is obtained, I have not seen this in any other language. You learn to look down on code, thinking more about how to organize it than how to write it. After python in other languages, you start to write better, because. useful ideas and principles remain in the head.
Ruby is somewhat "more powerful" as a language, gives more freedom, allows you to do more different tricks and does not have such a pronounced ideology. It seems to me that learning ruby ​​is also useful and practical, it is a good language, but python is more useful to learn because it teaches the right things (for example, avoid tricks at all costs).
Another option is to learn javascript. It is good to learn in order to understand all the FP features of the language and its non-standard object model. There are few js gurus, crowds know how to make a jQuery whistle and nothing more. With a good knowledge of js, it is quite easy to write all sorts of super-fast asynchronous realtime stuff in node.js. In terms of “power”, the language is quite adequate to Ruby and Python, except that it has a slightly less pleasant syntax and fewer libraries for the server side.
There are a lot of libraries for both python and ruby. Imho there are more of them than for php, and they have better distribution methods. Python has a standard library for all occasions with a lot of usefulness. The community is very different - in the ruby ​​community you will see beautiful sites advertising certain libraries, a bunch of awesome epithets, every second one will be a rock-star-programmer, etc., in the python community you will most likely see boring, harsh engineers. I, of course, exaggerate)
The areas of application for languages ​​are similar, the speed is similar, the capabilities are similar. The main criterion here is like/dislike.

K
kirill3333, 2010-09-30
@kirill3333

Java :)

N
Narada, 2010-09-30
@Narada

I would first try Python, 2-3 weeks (for general development), and then go towards Ruby.
If it were the other way around, I would be too lazy to learn Python after learning the beauty of Ruby :-[

B
bsboris, 2010-09-30
@bsboris

These languages ​​are very similar, both in purpose and in ideology. There are no radical differences between them.
Personally, I prefer Ruby, for the "correct" object model, for readable syntax, for blocks, for public classes. Again, another huge plus for Ruby is Rails.
So the answer is standard - try both and learn the one that suits your soul =)

B
burgua, 2010-09-30
@burgua

What else touches in ruby ​​is rubygems + a lot of libraries.

A
avatarmov, 2010-09-30
@avatarmov

Ruby definitely.
Python killed me with its syntax and complete dissimilarity to other languages.

A
Arvid Godyuk, 2010-10-01
@Psih

To know PHP != to be able to do complex things correctly on it.
Instead of learning another language, delve into PHP itself, and also get very close to MySQL (there is not a plowed field of optimizations, tricks, etc.) and other related technologies: Redis, MongoDB, Sphinx, accelerators (they can not only store opcode ), improve your skills in working with memcache, study architectures, study some thread framework (I recommend Yii - it is very competently built and expands to 100% any component by writing this very component itself + an entry in the config about redefining the standard component. No crutches and edits the framework itself. In general, a very correct OOP in the realities of PHP).

A
agh, 2010-09-30
@agh

I'm for python :) for django web

C
chetzof, 2010-09-30
@chetzof

Learn Google ;) stackoverflow.com/questions/673964/should-i-learn-ruby-or-python

M
mukizu, 2010-09-30
@mukizu

I think the best option is to start studying both. And then look at what is closer, more convenient, more understandable, etc. just for you. Well, the demand in the market.

A
aeryaguzov, 2010-10-01
@aeryaguzov

IMHO, if you know server technologies well, develop towards client technologies! So, as already advised above - javascript!

T
try4tune, 2010-09-30
@try4tune

The developer does not program in a language, but with the help of a language. I advise you to develop your knowledge more towards software architecture. Switching to almost any other language for a competent developer will not be difficult.

E
Eugene, 2010-09-30
@Nc_Soft

What goal are you pursuing? Just for show, I know a bunch of languages ​​for the same thing?

P
professor_kuvalda, 2010-10-01
@professor_kuvalda

Learn python. After all, it is used not only in web programming, but also in a bunch of other things:
- www.amazon.com/Natural-Language-Processing-Python-Steven/dp/0596516495
- www.sagemath.org/
- code.google.com /p/sympy/
- twistedmatrix.com/trac/
- and more

S
StrangeAttractor, 2010-10-02
@StrangeAttractor

I also asked myself this question - Ruby or Python ... As a result, I chose Scala and am happy as an elephant ...

P
PingMe, 2010-10-02
@PingMe

C++ :)

A
Avant, 2011-07-09
@Avant

ruby.
Pros:
Ruby on Rails
Excellent
OOP community, syntax
Lots of material, though most in English (books, blogs, screencasts)
RubyGems

A
Alexey Sidorov, 2010-09-30
@Gortauer87

Ruby and Python, although they have a beautiful, correct object model, are very far from how real hardware works. As a result, this results in a monstrous overhead, and Ruby manages to slow down more than Python, php in the same tests is somewhere nearby, but they all lag behind.
I would recommend learning programming languages ​​with static typing: they are fundamentally faster and closer to hardware.

S
Stepuk, 2010-09-30
@Stepuk

Python is the ideological successor of PHP. The same stupid language, behind which, among other things, no idea is visible. Just a clumsy combination of concepts stolen from everywhere. Nothing new. Python is not needed.
Ruby is the ideological successor of Perl. In some places it is redundant, in some places it is laconic. can be both beautiful and ugly. The guys from the district say that they are slow and are not good friends with Unicode, but OOP is coolly implemented in it. Ruby for an amateur.
Conclusion? Learn Haskell, it's time to look at programming from a different angle.

S
stranniknavsegda, 2010-10-01
@stranniknavsegda

THERE IS NO PANACEA! To each patient his own! Some are allergic to Ruby, some are allergic to Python... N's are allergic to Haskell... try both and see what you like...

O
Ogra, 2010-10-01
@Ogra

If you have a desire to learn something else, I can suggest this:
Read Eric Raymond's article "How to become a hacker", and choose a language from those suggested there - this is Perl, Python, C, LISP. Small quote:

Your best bet is actually to learn all four of these languages ​​(Python, C/C++, Perl, and LISP). In addition to being the most important hacker languages, they show very different approaches to programming and each will teach you valuable things.

A
Anton Korzunov, 2010-10-02
@kashey

Learn Lua - FP a la JS. These languages ​​are almost 99% similar. Well, except for the banal syntax.
Or has everyone forgotten about it?

D
Di Lee, 2010-10-03
@denlem

And what is the need to switch to another language?
PHP tired or not satisfied with something?
In general, such things can be done on PCP, if you know and apply other related technologies ... And believe me, there is room for development ... :)

N
NickMitin, 2010-10-03
@NickMitin

Both, why choose?

H
HeBonpoc, 2015-12-23
@HeBonpoc

What for "after PHP" somewhere to go? It is developing - develop with it without lowering your salary :) And in your free time, take a real problem from your projects and implement it in ruby ​​and python, then evaluate it. When posing the question ruby ​​vs python, it turns out a stupid holivar

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question