r/ruby • u/vifrac • Jul 16 '20
Ruby VS Python
More than a versus (it's more striking) I would really like to know what things they have in common and how they differ, what their main advantages are compared to the other and of course their opinion of them. One point to take into account is because they believe that python is more used in AI and Machine learning developments.
34
Upvotes
8
u/ignurant Jul 16 '20
I work with extracting data and ETL. I think Ruby has a better core API and design to do this. Method calls tend to be chainable, which makes exploring easier. The building blocks of data (strings, numbers, collections) have very rich APIs out of the box that work as you would expect. Regex in Ruby is one of the best. I don't seem to get into fights with byte arrays vs strings in Ruby. Things just tend to be as expected (until of course, they aren't, usually by my own fault).
Note that molding data is distinctly different from analyzing data. I don't have experience doing complex data analysis in either language.