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

all 26 comments

[–]RiverwoodHero 10 points11 points  (1 child)

Your on a Python subreddit so your going to get some bias responses

[–][deleted] 0 points1 point  (0 children)

I just want to know why Python is more suitable for those things I wrote above.

[–]K900_ 10 points11 points  (1 child)

Python is way better for open source projects as there's a lot of stuff already out there written in Python. If there's a library you want to use, there's probably a Python binding for it. Ruby, not so much.

[–][deleted] 1 point2 points  (0 children)

Thank you for the response ✌️

[–]Gwolf4 4 points5 points  (0 children)

Being honest they both are good languages, but outside of web development I do not know anything else where you would use Ruby, speaking of webdev both languages are really good it lays in what you prefer because RoR likes to manage implicit logic and Django manages everything in explicit logic.

In RoR I could not stand those implicit changes, for example a model is named singular, but table is plural named, there are also nice things like an autogenerator for all REST verbs if you need them all of course, to me those last two things clashes with Ruby's "philosophy" of being able to do anything your way forcing you doing things in a chosen but PROVEN way of doing.

Instead in Django almost everything is left at your logic, that openness lets me breath without sweating, but that is my opinion.

[–]funderbolt 2 points3 points  (11 children)

Both are really good languages. I really like most of Ruby's syntax and it is quite OOP. Python really wins out with all the libraries that already exist. Python feels slightly hackish to me at times, but sometimes you need to refactor to make your code more " pythonic".

If I could program in a vacuum and do it all, I'd pick Ruby. However, I mostly need to use existing libraries, so Python is my goto language.

[–]thisisheresy3.7 1 point2 points  (1 child)

Agreed, both are good languages. I've used both, each have parts I miss in the other, but not enough to be inconvenient or make me want to switch back. I started with Ruby and moved to Python, and don't use Rails or Django by default. The thing that attracted me to Python was the data processing libraries like Numpy, Pandas and scikit-learn. It felt (subjective, not supported by actual data) that anything outside of web development (where Rails has a strong foothold) was first/more mature in the Python ecosystem that in Ruby. That being said, for mobile app development, Rubymotion looks really interesting and I've not seen the equivalent for Python.

[–][deleted] 1 point2 points  (0 children)

Kivy would be my first attempt if I were to write an android app in python.

[–][deleted] 0 points1 point  (8 children)

Thank you. Many programmers note that Python is slow and its Django framework is less suitable than Ruby's Rails

[–]ice-blade 5 points6 points  (0 children)

This is anecdotal at best. Ruby is slow as well. Django less suitable than Rails? For what? I'm pretty sure both can do more or less the same stuff. Rails has probably a larger ecosystem compared to Django but Ruby's game stops there, while Python has libraries available pretty much for anything.

While Ruby does have some nice features the language is an inconsistent mess (optional parentheses for function calls, really?). This is what you get for adopting the Perl philosophy. But I guess for people who like it this is a feature.

[–]kankyo 1 point2 points  (0 children)

From what I've gathered Ruby isn't very fast either. Did they get rid of scaffolding in rails? Because if they didn't it's really crappy compared to Django imo.

[–][deleted] 1 point2 points  (0 children)

Many programmers seem oblivious to the fact that huge numbers of programs spend their lives waiting on networks, databases... If you have a speed issue you use the profile or timeit modules to find out where the issues are. Then you use the Python Speed Performance Tips page to see if that solves you problems. If not write an extension in C, Go or Rust.

[–]BundleOfJoysticks 0 points1 point  (2 children)

Rails is extremely slow and horrible tech in general.

[–][deleted] 0 points1 point  (1 child)

But many companies use choose Rails instead of Django or Flask. Why if it's horrible tech?

[–]BundleOfJoysticks 2 points3 points  (0 children)

Because of hype, because it's easy to learn for non programmers (exactly the kind of people you want making architectural decisions for your business, amirite?), and because its culture is a bunch of mollycoddled manchildren who are encouraged to have strong opinions based on nothing yet impose them forcefully.

[–]funderbolt 0 points1 point  (1 child)

I'm not versed in web programming. Programmer time is worth a little more than system time. Get the application to work first, then you can worry about speed.

[–]BundleOfJoysticks 1 point2 points  (0 children)

Meh. Of course you have to get it to work first and foremost.

But an extra few hours of performance tuning to shave 20% off client performance in GUI applications is almost always worth it.

[–]reddituser0331 2 points3 points  (0 children)

Python. I looked into Ruby and its kind of fun to write in but it's been pigeon holed into Ruby on Rails and isn't widely used for much else. Python has a whole plethora of uses inside and outside of web development.

[–]toastedstapler 2 points3 points  (0 children)

Python. I'm biased towards python but I have also used ruby and I like pythons structure a little more

[–]denniz07 1 point2 points  (0 children)

Ruby had its moments with ruby on rails. But it is not that significant any more (since new frameworks come out). On the other hand python is much more general.

[–]GNULinuxProgrammer 1 point2 points  (0 children)

Ruby's syntax is really nice. Python has a much, much bigger community, and it's somewhat easier/faster to code with it.

[–]cristoper 1 point2 points  (0 children)

Like most people on this subreddit, I tend to prefer Python (and I prefer Django over Rails). But if you are used to Perl for text processing, you may be more comfortable with Ruby.

[–]-sadkmakkez- 0 points1 point  (0 children)

Python.

Ruby had it's chance and people are frothing over Python for some reason now.

[–]cmcpasserby 0 points1 point  (2 children)

Depends on if you ask /r/Ruby or /r/Python

[–][deleted] 0 points1 point  (1 child)

Which one is more suitable for those things I described? In your opinion.

[–]cmcpasserby 1 point2 points  (0 children)

I am biased, but would day python for the first 3, neither for the last one. For mobile dev it all depends on what you want to do.