Why Ruby?

Ary Borenszweig ary at esperanto.org.ar
Sat Dec 11 05:53:16 PST 2010


On 12/10/2010 10:26 PM, Ary Borenszweig wrote:
> http://vimeo.com/17420638
>
> A very interesting talk.
>
> I used to like D. To write code in a high level while at the same
> time being very close to the machine, with class invariants, unit
> tests and many other features seemed very appealing. But I always
> felt there was something wrong.
>
> About a year ago I met Ruby. Now I find languages like Java, C#,
> Python and D kind of ugly and uncomfortable. Why? Exactly because of
> what it is said in that video.
>
> This is not to start a flame war or trolling, it's just to show you
> why I changed my mind so much about D, and why I think (IMHO) you
> should care about naming conventions (like bearophile says), more
> powerful unittests (and not having unittests integrated into the
> language but rather being able to build your own test frameworks
> with ease) and stop caring about being C-syntax friendly. The world
> doesn't need that many semicolons and parenthesis. :-)

I guess what I liked about it (and Ruby) is that I see everything is 
very consistent and nice to my eyes. I never squeeze my brian to 
understand a piece of code, nor I had to deal with __some__strange 
variable names, or even __keywords.

Code is read many more times than it is written and so it is of huge 
important that code is as readable as possible. Of course this is a 
subjective matter, but I don't understand why some people think __traits 
or __gshared are ok. So what if those are compiler extensions or 
whatever? I don't want to stop thinking about those details of a 
programming language when I'm dealing with another problem. When I read 
Ruby code I feel like I'm reading an English textbook (better, a poem 
:-P), while why I read other languages I feel I'm reading... well, a 
programming language. And my head is so much better at reading text than 
reading machine code.

Then, other things in D like properties for which you do ++ don't work 
or such corner cases doesn't happen in Ruby. It's consistent. Once Ruby 
defines something, it does it well, not just half through it.

But yes, I agree with everyone here, the rest of the talk is not very 
serious...


More information about the Digitalmars-d mailing list