TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why do so many people hate Ruby?

28 点作者 eric970超过 12 年前
I've been a Ruby dev and a Rails dev for about two years now. I've always found the former to be an enjoyable, elegant language to write in, and the later to be a wonderful framework that makes use of some great patterns and gems. I'm not <i>only</i> a Ruby and Rails dev; I also enjoy programming in JS and I've been teaching myself Python as well.<p>Lately, especially after these security vulnerabilities became public, I've seen a lot of hate directed towards both the Ruby and the Rails community.<p>I'm curious as to why this is, and I'd like to get HN's input on this. The Ruby community has a lot of drama from time to time, but that's the only reason I can think of. Where is the hate coming from of people who say everybody should just throw out Ruby, stop using Rails, etc.?

9 条评论

btilly超过 12 年前
To me the biggest annoyance about the Ruby community is the belief that they invented everything and know how to do everything right if others would just listen.<p>And then, through unfamiliarity with what others learned a long time ago, they do it wrong.<p>As a random example, unit testing has been the standard for perl (note capitalization - I'm referring to the interpreter here) since it was released in the mid-80s, and for the Perl community since CPAN was created in the mid-90s. And when I say standard I don't mean that someone writes tests, runs it, then packages. I mean that - by default - nothing gets installed anywhere until it has passed its full test suite. Furthermore if I release a module to CPAN, I'll get automated emails about every OS and version of Perl that it didn't work on.<p>Core ruby still does not have good unit tests, and you have to go out of your way to run unit tests for gems. If you do that, you will find that a good portion were only set up for the author to run - they didn't think anyone else would ever do that.<p>And yet I've had Ruby devs with a straight face trying to tell me that Ruby is awesome for its testing culture, and everyone else has a lot to learn from them.<p>They are missing a lot, and don't realize it.
评论 #5160727 未加载
memracom超过 12 年前
I used to code in Ruby before Rails existed and I switched back to Python because they had addressed a lot of the problems with object-oriented and functional programming that made me look for something else. And then there was this wave of arrogance when Rails popped up and it seemed that lots of people with little standard of comparisons made outrageous claims about Ruby. Rails and the Ruby community borrowed a lot of work from Python and other communities but claimed that it was "invented here" and did not give credit to those upon whose shoulders they were standing.<p>Ruby is overrated. Python is in most ways Ruby's equal, and in some ways a superior community. Groovy, on the JVM, with Grails can do the same sorts of things as Rails and gives access to the whole JVM ecosystem of libraries that is far larger than the GEMs collection. Scala is an important language that more people should use because it guides a developer towards writing cleaner code and using architectural patterns that lead to much more maintainable code.<p>That said, I would rather see people build things with Ruby rather than with Java or C++, so I am not one of those who would throw Ruby out entirely. If people decide to replace PERL with Ruby, I would applaud that action, even though I believe that Python is a better way to go.<p>But due to the negative factors in the Ruby community I would not advise anyone to learn Ruby as their first language because of the great risk of becoming a first-language fanboy. Better to start with something else, even PERL, C++ or Java, so that they have some perspective on programming languages.
评论 #5160816 未加载
phatbyte超过 12 年前
People don't hate ruby, people hate the ruby on rails community.<p>Personally I don't have any beef with them, but when I ask people about the RoR community I hear lots of douchebagery stories.<p>One of the most frequent is how cocky everyone in RoR feels towards other programmers in other languages and how "cool" their framework is and so on.<p>This started towards PHP programmers, then moved to Python(Django) and recently it's Node.js who's getting lots of flames from them.<p>So yeah..
评论 #5158110 未加载
评论 #5162721 未加载
评论 #5158320 未加载
评论 #5160284 未加载
评论 #5158350 未加载
csense超过 12 年前
The syntax. Python's syntax is much cleaner.<p>I tried to find examples of Ruby's awful syntax in tutorials, but much to my surprise, the code in the introductory sections of a couple tutorials picked at random looks clean and the language seems nearly Pythonic. Contrast that with a function from an actual Ruby on Rails project [1]:<p><pre><code> def fresh_commits(repo, n = 10) commits = repo.heads.map do |h| repo.commits(h.name, n).map { |c| Commit.new(c, h) } end.flatten.uniq { |c| c.id } commits.sort! do |x, y| y.committed_date &#60;=&#62; x.committed_date end commits[0...n] end </code></pre> Whoa! This code apparently calculates factorials (with the ! operator), absolute values (of course |x, y| looks like the length of a vector), and biconditionals (to someone with a math background, a &#60;=&#62; b means a =&#62; b and b =&#62; a). The function ends with an expression on the last line that doesn't look like it would have side-effects. WTF? There are question marks and colons in weird places in that file, too. I started to translate the function into Python, to show you how much cleaner it would be, but I simply couldn't follow what the multiple nested map's and uniq is supposed to do. I'm certain that the Python equivalent would be much easier to follow. (Even if you take "equivalent" to mean "list comprehension" or "itertools.map" instead of the most readable alternative, nested-for-loops.)<p>I don't think this project is particularly good or bad. I merely picked a random piece of Ruby code from an app I installed recently, and I feel the difficulties I had with the syntax of this function are representative of my struggles with Ruby as a whole.<p>All the strange symbols make Ruby code very hard to read. For me, the effort required to learn a language is directly related to the number of operator symbols it contains. Ruby is nearly as bad as Perl or shell scripts. (The operators-are-bad penalty to my impression of a language is reduced if same operator exists in other languages I already know well, like Python, C, C++, or standard mathematical notation.)<p>In Python, by contrast, you can usually get a fairly good idea of what syntactical constructs do without consulting the manual, even if you're unfamiliar with them. (To be fair, lambda is an exception.)<p>[1] <a href="https://github.com/gitlabhq/gitlabhq/blob/5a214ee6f198a90f41a54b3dd7f2ff6a318a8deb/app/models/commit.rb" rel="nofollow">https://github.com/gitlabhq/gitlabhq/blob/5a214ee6f198a90f41...</a>
评论 #5159344 未加载
mingpan超过 12 年前
From what I've seen, people are angry at a certain subset of the Ruby on Rails community, but then they take that anger and generalize it to the Rails community or even the Ruby community as a whole.
orangethirty超过 12 年前
You really can't hate a language (well, I do have a complex relationship with PHP). What people hate are stereotypes built around communities. Usually from the conduct of some individuals. Every community has them. I mean, even the COBOL guys must roll their eyes anytime someone writes some douche comment about the language.<p>Don't pay attention to them. There are many nice people in the Ruby community. People who are there for the code, and not the drama.<p>Now, don't get me started about those Visual Basic guys... :)
评论 #5159364 未加载
xijuan超过 12 年前
Like many of the comments have already mentioned, people in the Ruby on Rails community are arrogant. They think they are doing things in the right way.
drstewart超过 12 年前
I see more arrogance here than I ever have in the Ruby community, to be honest.<p>I guess all communities can't be as tolerant and high-minded as C++ and the level headed discussions I see going on in the Linux kernel mailing list.
MrBra超过 12 年前
&#62; Why do so many people hate Ruby? Because they have sweated too hard to get a productive knowledge of their own favourite language with so much of "adapt your brain to the tool and remember how you did by heart" which in ruby never happens( it adapts to your human brain) and then they are turned off by the feeling of envy for this.
评论 #5158631 未加载