TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: As a Python developer, what am I missing for not using Ruby?

33 pointsby 15DCFA8Falmost 9 years ago
Over the last couple of years I have been programming in Python almost exclusively (and some JavaScript, Bash and Go for some specific tasks, easily chosen for the task at hand instead of Python).<p>What I found with Python is that it is a great platform for doing my things, like web services, data transformation, general Linux automating, infrastructure monitoring, and so on.<p>As it is good enough for 90% of my needs, I settled down on it and now I feel that I am missing opportunities of being more productive and getting more knowledge from other languages.<p>I looked at Ruby and found some interesting aspects (as a former Perl programmer), with its expressiveness. I learned a bit of Ruby, but I keep doubting myself if Ruby language and platform would bring me more value or that would only bring fragmentation on my projects.<p>I do not look to replace Python, but want to know if there would be some clear decisions points to take when choosing between Python and Ruby for my next projects, or both are more or the less a tool to solve the same problems.<p>If any of you worked or work with both languages, sharing your experiences would be greatly appreciated.

16 comments

webmavenalmost 9 years ago
I&#x27;m a mostly Python &#x2F; occasionally Ruby web developer.<p>There isn&#x27;t much you&#x27;re missing. About the only use-case I can think of where Ruby has a clear advantage is in creating a DSL.<p>Other than that, there are differences in what already exists in the two ecosystems, but (at least for web development) generally there are equivalents available (eg. Nokogiri vs. BeautifulSoup). The Rails and Django frameworks are roughly comparable, for example, with Rails being more &#x27;magical&#x27; vs. Django being more explicit. Which one is better for you may just come down to your personal tastes.<p>Now, outside of web development, Python has a clear advantage in areas such as scientific computing, game development, machine learning, and many other areas in which Ruby doesn&#x27;t really have much of a presence. This isn&#x27;t due to any inherent quality of the two languages, just historical contingency, as Ruby&#x27;s emergence from obscurity was a result of Rails taking off, whereas Python grew a large and eclectic user community (of which web development was a small part) more slowly, but starting years earlier.
评论 #12013482 未加载
评论 #12018413 未加载
评论 #12013317 未加载
FraaJadalmost 9 years ago
As a python programmer for over 15 years, you will be better served by learning a PL from a different paradigm<p>* Erlang&#x2F;Elixir -- concurrency<p>* OCaml&#x2F;Haskell -- static typing etc.,<p>* Typescript&#x2F;Elm&#x2F;Purescript -- better Javascript<p>* You get the idea ...<p>more so than Ruby. Ruby lives in the same neighbourhood in the galaxy of programming languages. You are not missing much by ignoring Ruby.
hodwik2almost 9 years ago
If you&#x27;re going to learn another language, learn something from a different programming paradigm, or one which is lower level.<p>Learning Ruby would be an absolute waste of time.<p>This isn&#x27;t a hip or cool answer, but I&#x27;d suggest learning Java. It&#x27;s one of the most popular languages by a large margin, and knowing it will help you speak the object-oriented lingua franca. If you only write Python, you&#x27;re probably mostly writing procedural code. Learning OO is a good idea.
评论 #12029635 未加载
schappimalmost 9 years ago
I&#x27;ve been a Ruby (not rails) developer for 10 years and use python when hacking together hardware projects.<p>Generally speaking Ruby has a better standard library, the major libraries (gems) seem to be better built with nicer APIs and unit tests.<p>I think the best example of Ruby at it&#x27;s best is the Sinatra web framework.<p>Having said of this, I don&#x27;t think that Ruby is the language of the future.<p>In my humble opinion the language combination of the future is going to be Python as my interpreted language of choice + Swift* (for when I want a more strongly typed &#x2F; functional language or when I need things to be fast).<p>* Swift could be my only language if they had an interpreter.
评论 #12014210 未加载
amorphidalmost 9 years ago
I like what a friend of mine who went from Ruby to Python said... &quot;Python is easier to understand, harder to love.&quot;<p>For me personally:<p>* I like Rubygems &amp; Bundler more than Pip<p>* I find the split between Python 2.x and 3.x to be obnoxious<p>* Python whitespace indentation bugs me a lot<p>TL;DR -- Python isn&#x27;t much different than Ruby in terms of what it can and cannot do. Personally, my new favorite language is Elixir, which does a whole bunch of stuff neither Ruby or Python does particularly well.
评论 #12013721 未加载
atrudeaualmost 9 years ago
From a practical point of view, I&#x27;d agree with others: you&#x27;re only missing a checked box on your resume.<p>From a non-practical point of view, you&#x27;re missing out on the pure joy of writing Ruby. Everyone should try it at least a couple of times to see just how expressive and fun programming can be. As someone who programs regularly in Python, Go, JavaScript, and Java, Ruby blows them away in FUN points.<p>As a side note, it would be awesome if someone wrote a Ruby -&gt; Python compiler. I would love to be able to call NumPy from Ruby code. I would even be happy with a (generous) subset of the language. I think gluing together Python libs with Ruby would be a pleasure, and people could start using DSL magic to implement better APIs for existing libraries.
dansoalmost 9 years ago
I was a Rails dev for a few years and have now moved to Python, but only because I now do more data analysis and little web dev.<p>You&#x27;re not missing much...in terms of practical benefits, you&#x27;re missing out on putting Rails on your resume. In terms of programming experience...you&#x27;re missing out on the meta-programming and fun monkey-patching that Ruby&#x27;s syntax invites. And multi-line lambdas.<p>As someone who loves Ruby, I could not argue that learning Ruby is an optimal use of time for the Python programmer...you&#x27;d be better off focusing on something lower level, like Rust, or highly differentiated in paradigm, such as Elixir. FWIW, a notable number of well-known Ruby devs have left the fertile life of Rails dev to pursue those two languages.
评论 #12016798 未加载
kennellalmost 9 years ago
I use Python whenever i can, but had some Jobs where i was doing mostly Ruby on Rails.<p>For me some of the differences are:<p>* gem &gt; pip<p>* Ruby on Rails is much more mature than Django. The framework itself and the surrounding gem ecosystem... it&#x27;s like its 3 years ahead of Django. Don&#x27;t get me wrong, you can get anything done i either framework, but Rails just gets it right more often and is better suited for modern web development. You get a testing&#x2F;dev&#x2F;production setups, a asset pipeline and a lot of other stuff right out of the box, where as in Django you find yourself fidling with third-party packages of varying quality. * you can build very neat DSLs if you are into that<p>On the other hand:<p>* Outside of web development; Python seems to have a broader selection of high-quality libraries (especially in the analytics&#x2F;datascience category)<p>At the end of the day, i think both are pretty much equal suited for most tasks.
imauldalmost 9 years ago
IMO Ruby and Python are two sides of the same coin. They have their differences but whatever you can do in one you can usually do in the other. I&#x27;m a Python programmer myself and I find the &quot;magic&quot; of Ruby code I&#x27;ve seen slightly unsettling at times, explicit is better than implicit after all ;-).<p>One of the main disadvantages to Ruby, based off my limited knowledge of Ruby, is that if you are making a web app with Ruby you are making a Rails app. With Python Django is probably the most popular but it&#x27;s far form the only one (Flask, Bottle, Falcon, Web2Py, CherryPy, Pyramid, Zope, etc.).<p>If you are interested in learning another language I would suggest Go. The syntax is easy to pick up if you are a Python dev and it can do a lot of really cool things with a pretty small amount of code.<p>DISCLAIMER: I have only done the most basic of Ruby tutorials but none of them have inspired me to learn more.I also hate ``end``.
nurettinalmost 9 years ago
Ruby can be used the same way as perl when building commandline tools that use repl and regex. ($~,$1,$2, etc.)<p>You can also add new methods to classes and you can override callbacks such as method_missing to respond to method calls at runtime.<p>You also have a choice between lazy and non-lazy versions of map&#x2F;reduce&#x2F;select.<p>You also have a rust interface to create gems that run native code.<p>You also get an extensible build tool called rake.<p>You also get RoR5 if you enjoy that kind of thing.
评论 #12022866 未加载
probinsoalmost 9 years ago
Tokens insread of strings as keys. Ruby has :tokenname instead of “tokenname“ as option for key like parameters
评论 #12016746 未加载
anilgulechaalmost 9 years ago
There&#x27;s on beautiful thing you&#x27;re missing at the language level: method_missing. So much of ruby&#x27;s power is derived from this one feature.
kristianpalmost 9 years ago
I&#x27;m in the reverse position of knowing Ruby but not knowing Python. What am I missing out on by not knowing Python?<p>It seems machine learning is one thing, that is much better supported from Python, but anything else?
评论 #12013396 未加载
bobwaycottalmost 9 years ago
The only thing I&#x27;ve ever felt I&#x27;m missing in Python, in comparison to Ruby, is the &#x27;unless&#x27; keyword and much nicer metaprogramming.
boraturanalmost 9 years ago
I am on Win&#x2F;.NET, am I missing something?
collywalmost 9 years ago
Thick rimmed glasses and a bushy beard.