<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 10 Things I Hate About Ruby</title>
	<atom:link href="http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/</link>
	<description>Longer than a blog; shorter than a book</description>
	<lastBuildDate>Wed, 08 Feb 2012 21:45:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: kirat</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-956159</link>
		<dc:creator>kirat</dc:creator>
		<pubDate>Wed, 08 Feb 2012 21:45:25 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-956159</guid>
		<description>i say that ruby is stupid and i hate her</description>
		<content:encoded><![CDATA[<p>i say that ruby is stupid and i hate her</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kirat</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-956158</link>
		<dc:creator>kirat</dc:creator>
		<pubDate>Wed, 08 Feb 2012 21:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-956158</guid>
		<description>ruby is stupid and she is bosse</description>
		<content:encoded><![CDATA[<p>ruby is stupid and she is bosse</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Battletron</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-794468</link>
		<dc:creator>Battletron</dc:creator>
		<pubDate>Sun, 11 Sep 2011 23:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-794468</guid>
		<description>Jim, your code returns &quot;____.rb:4: syntax error, unexpected keyword_end, expecting $end&quot; because on line 4 there&#039;s an unexpected &quot;end,&quot; that is, it&#039;s not closing anything. That&#039;s because &quot;Class&quot; should be class. Also, &quot;initialise()&quot; should be &quot;initialize()&quot;. Also, you need to close your quotes. These issues a) are programming 101, and b) shouldn&#039;t need a compiler, as in any decent text editor the errors should literally be color-coded.

As for the main argument, there are some legitimate complaints about Ruby, and there were more back when it was written (documentation, XML, speed) that have since seen at least partial progress toward resolving. Syntax peculiarities are not among them.

1. new creates a new instance of a class, and it calls initialize to set it up for you. Think of it more as self.new(*args, &amp;block), which allocates memory, sends the args and block to initialize, then returns the object. It can also be overridden, but generally people use initialize because they don&#039;t want to alter the allocation and return parts.

2. Already been addressed. Dynamic typing (and Ruby&#039;s focus on duck typing) has its benefits and drawbacks, but given the amount of work some verbose languages like C# require just to maintain the type system, Ruby does eliminate some mindless work. There are speed consequences and type safety consequences, but no programming language is perfect in all cases, and Ruby fits its niche quite well.

3. Everything returns something. Why is implicitly returning a null or undefined value better than implicitly returning the last line? And given Ruby&#039;s emphasis on closures and chaining, it works: I&#039;d rather see arr.map { &#124;n&#124; &quot;a&quot; * n } than return arr.map { &#124;n&#124; return &quot;a&quot; * n }. Plus, is there a reason and object-oriented language should default to a nil object (or, God forbid, a special literal like null)?

4. Global vars are generally used sparingly. It&#039;s better that they exist than not. Even if they&#039;re usually a bad idea, in some cases they&#039;re indispensable.

5. puts can be abbreviated as p. You can use print and end it with a newline. You can alias it in one line with put or say or println or cout or whatever.

6. Zero-based arrays are what most programmers expect. An array of length l has indices 0 ? i &lt; l. l - 0 = l, so this interval also describes the length of the array. When extended by m places, the added elements have indices l ? i &lt; l + m. They just make the math easy. Plus, there&#039;s an ary.first method.

7. Is there any reason it&#039;s worse than else if or elseif or elif or nested ifs? It&#039;s just a control keyword, and it&#039;s really a fairly uncommon one (roughly 1/10 as common as else and 1/5 as common as case in Rails source, for example).

8. Are these really being abused?

9. It takes a second to type private and begin typing private methods after it. Any half-decent code will do this.

10. Friend accessors? In general, when I see these used it&#039;s to break encapsulation. Its legitimate use cases exist, and probably the biggest one missing from Ruby regards testing, but it&#039;s hardly something worth hating. Furthermore, despite the limitations imposed by &quot;mere&quot; public/protected/private visibility, they generally allow for terse, legible, fully functional code.</description>
		<content:encoded><![CDATA[<p>Jim, your code returns &#8220;____.rb:4: syntax error, unexpected keyword_end, expecting $end&#8221; because on line 4 there&#8217;s an unexpected &#8220;end,&#8221; that is, it&#8217;s not closing anything. That&#8217;s because &#8220;Class&#8221; should be class. Also, &#8220;initialise()&#8221; should be &#8220;initialize()&#8221;. Also, you need to close your quotes. These issues a) are programming 101, and b) shouldn&#8217;t need a compiler, as in any decent text editor the errors should literally be color-coded.</p>
<p>As for the main argument, there are some legitimate complaints about Ruby, and there were more back when it was written (documentation, XML, speed) that have since seen at least partial progress toward resolving. Syntax peculiarities are not among them.</p>
<p>1. new creates a new instance of a class, and it calls initialize to set it up for you. Think of it more as self.new(*args, &amp;block), which allocates memory, sends the args and block to initialize, then returns the object. It can also be overridden, but generally people use initialize because they don&#8217;t want to alter the allocation and return parts.</p>
<p>2. Already been addressed. Dynamic typing (and Ruby&#8217;s focus on duck typing) has its benefits and drawbacks, but given the amount of work some verbose languages like C# require just to maintain the type system, Ruby does eliminate some mindless work. There are speed consequences and type safety consequences, but no programming language is perfect in all cases, and Ruby fits its niche quite well.</p>
<p>3. Everything returns something. Why is implicitly returning a null or undefined value better than implicitly returning the last line? And given Ruby&#8217;s emphasis on closures and chaining, it works: I&#8217;d rather see arr.map { |n| &#8220;a&#8221; * n } than return arr.map { |n| return &#8220;a&#8221; * n }. Plus, is there a reason and object-oriented language should default to a nil object (or, God forbid, a special literal like null)?</p>
<p>4. Global vars are generally used sparingly. It&#8217;s better that they exist than not. Even if they&#8217;re usually a bad idea, in some cases they&#8217;re indispensable.</p>
<p>5. puts can be abbreviated as p. You can use print and end it with a newline. You can alias it in one line with put or say or println or cout or whatever.</p>
<p>6. Zero-based arrays are what most programmers expect. An array of length l has indices 0 ? i &lt; l. l &#8211; 0 = l, so this interval also describes the length of the array. When extended by m places, the added elements have indices l ? i &lt; l + m. They just make the math easy. Plus, there&#039;s an ary.first method.</p>
<p>7. Is there any reason it&#039;s worse than else if or elseif or elif or nested ifs? It&#039;s just a control keyword, and it&#039;s really a fairly uncommon one (roughly 1/10 as common as else and 1/5 as common as case in Rails source, for example).</p>
<p>8. Are these really being abused?</p>
<p>9. It takes a second to type private and begin typing private methods after it. Any half-decent code will do this.</p>
<p>10. Friend accessors? In general, when I see these used it&#039;s to break encapsulation. Its legitimate use cases exist, and probably the biggest one missing from Ruby regards testing, but it&#039;s hardly something worth hating. Furthermore, despite the limitations imposed by &quot;mere&quot; public/protected/private visibility, they generally allow for terse, legible, fully functional code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javitzso</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-769585</link>
		<dc:creator>Javitzso</dc:creator>
		<pubDate>Tue, 16 Aug 2011 17:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-769585</guid>
		<description>In the future there will be two types of computers.  One that can process only mundane things like browsing the internet and updating a Twitter account.  The other type of computer will have the added ability to compile code for making things.  This compiler will be standardized and you will not be able to purchase or own one of these (legally) without a doctorate and certification.

It will be illegal and abhorrent to experiment in programming languages just as much as performing science experiments on human bodies without the proper credentials and permission.  Computers hold people&#039;s lives now!  It&#039;s a serious business.  It&#039;s not a game anymore.  Get these insecure &quot;easy button&quot; languages out of here before some idiot uses them to code a government website somewhere!</description>
		<content:encoded><![CDATA[<p>In the future there will be two types of computers.  One that can process only mundane things like browsing the internet and updating a Twitter account.  The other type of computer will have the added ability to compile code for making things.  This compiler will be standardized and you will not be able to purchase or own one of these (legally) without a doctorate and certification.</p>
<p>It will be illegal and abhorrent to experiment in programming languages just as much as performing science experiments on human bodies without the proper credentials and permission.  Computers hold people&#8217;s lives now!  It&#8217;s a serious business.  It&#8217;s not a game anymore.  Get these insecure &#8220;easy button&#8221; languages out of here before some idiot uses them to code a government website somewhere!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-682869</link>
		<dc:creator>Cameron</dc:creator>
		<pubDate>Thu, 26 May 2011 02:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-682869</guid>
		<description>Jim, I don&#039;t know what environment you&#039;re running in, but your code didn&#039;t produce any errors on my system with Ruby 1.9.2.  You mistakenly used a capital &quot;C&quot; for &quot;Class&quot;, which I fixed, so that might be your problem.  Make sure you&#039;re using the right syntax before you call a language shitty - the problem here between the keyboard and the chair.</description>
		<content:encoded><![CDATA[<p>Jim, I don&#8217;t know what environment you&#8217;re running in, but your code didn&#8217;t produce any errors on my system with Ruby 1.9.2.  You mistakenly used a capital &#8220;C&#8221; for &#8220;Class&#8221;, which I fixed, so that might be your problem.  Make sure you&#8217;re using the right syntax before you call a language shitty &#8211; the problem here between the keyboard and the chair.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-573867</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Tue, 18 Jan 2011 09:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-573867</guid>
		<description>Try this on for size.....


----

Class Player
  def initialise()
  end
end


puts &quot;Welcome to a retarded example&quot;
puts &quot;As you can see
player = Player.new
puts &quot;The results of this example are fucking retarded.&quot;
-------

Returns &quot;unexpected keyword_end, expecting $end&quot; in Ruby 1.9.1 and 1.9.2
Have yet to try it on the older versions.
Shitty languages produce shitty useless errors. I&#039;ll be taking up python TYVM.
Also tried spelling it initialize()</description>
		<content:encoded><![CDATA[<p>Try this on for size&#8230;..</p>
<p>&#8212;-</p>
<p>Class Player<br />
  def initialise()<br />
  end<br />
end</p>
<p>puts &#8220;Welcome to a retarded example&#8221;<br />
puts &#8220;As you can see<br />
player = Player.new<br />
puts &#8220;The results of this example are fucking retarded.&#8221;<br />
&#8212;&#8212;-</p>
<p>Returns &#8220;unexpected keyword_end, expecting $end&#8221; in Ruby 1.9.1 and 1.9.2<br />
Have yet to try it on the older versions.<br />
Shitty languages produce shitty useless errors. I&#8217;ll be taking up python TYVM.<br />
Also tried spelling it initialize()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-552554</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Sat, 11 Dec 2010 10:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-552554</guid>
		<description>Why are some people so zealous about defending their language? I don&#039;t go to France and tell everyone English is a better language than French. Why not just shut the hell up and use whatever suits your individual tastes? They all get the job done in the end.

Personally I would love to be able to speak to my computer in plain English and have it construct some software for me in 10 seconds flat but that isn&#039;t gonna happen any time soon. Until then, all languages are flawed.

The most retarded thing about this discussion is that there are people saying some things are down-right wrong. How the fuck can a language be &quot;wrong&quot;?</description>
		<content:encoded><![CDATA[<p>Why are some people so zealous about defending their language? I don&#8217;t go to France and tell everyone English is a better language than French. Why not just shut the hell up and use whatever suits your individual tastes? They all get the job done in the end.</p>
<p>Personally I would love to be able to speak to my computer in plain English and have it construct some software for me in 10 seconds flat but that isn&#8217;t gonna happen any time soon. Until then, all languages are flawed.</p>
<p>The most retarded thing about this discussion is that there are people saying some things are down-right wrong. How the fuck can a language be &#8220;wrong&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Shackleford</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-470983</link>
		<dc:creator>Rusty Shackleford</dc:creator>
		<pubDate>Wed, 24 Mar 2010 20:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-470983</guid>
		<description>&quot;It’s bad enough that it’s not mandatory (why have it!) But the actual coding convetion – or idiom – is to not use it. &quot;

The results of the last line of a method automatically gets returned, explicitly putting a return is redundant.

Why does it exist?

def meth state
return &quot;hi&quot; if state.nil?
&quot;bye&quot; 
end


It is that much to ask for people who complain to understand what they are complaining about?</description>
		<content:encoded><![CDATA[<p>&#8220;It’s bad enough that it’s not mandatory (why have it!) But the actual coding convetion – or idiom – is to not use it. &#8221;</p>
<p>The results of the last line of a method automatically gets returned, explicitly putting a return is redundant.</p>
<p>Why does it exist?</p>
<p>def meth state<br />
return &#8220;hi&#8221; if state.nil?<br />
&#8220;bye&#8221;<br />
end</p>
<p>It is that much to ask for people who complain to understand what they are complaining about?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Shackleford</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-470980</link>
		<dc:creator>Rusty Shackleford</dc:creator>
		<pubDate>Wed, 24 Mar 2010 20:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-470980</guid>
		<description>&quot;“a lack of understanding of whatâ€™s going on under the hood seems to be absent”

Isn’t that what we want?&quot;


No, we want programmers who understand what is going on from the processor on up. If you don&#039;t understand what is going on under the hood, you are an API monkey, not a programmer.

Most Java and .net programmers do not, and thus suck.</description>
		<content:encoded><![CDATA[<p>&#8220;“a lack of understanding of whatâ€™s going on under the hood seems to be absent”</p>
<p>Isn’t that what we want?&#8221;</p>
<p>No, we want programmers who understand what is going on from the processor on up. If you don&#8217;t understand what is going on under the hood, you are an API monkey, not a programmer.</p>
<p>Most Java and .net programmers do not, and thus suck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rusty Shackleford</title>
		<link>http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/comment-page-2/#comment-470979</link>
		<dc:creator>Rusty Shackleford</dc:creator>
		<pubDate>Wed, 24 Mar 2010 20:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://cafe.elharo.com/ruby/10-things-i-hate-about-ruby/#comment-470979</guid>
		<description>&quot;Why was Ruby created? It seems to have no purpose other than as an esoteric platform for creating cute code.&quot;

Why was Java and C# created? They are both younger than Ruby.

In fact we should all be using Algol or 1950&#039;s Fortran right?</description>
		<content:encoded><![CDATA[<p>&#8220;Why was Ruby created? It seems to have no purpose other than as an esoteric platform for creating cute code.&#8221;</p>
<p>Why was Java and C# created? They are both younger than Ruby.</p>
<p>In fact we should all be using Algol or 1950&#8242;s Fortran right?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

