Ruby, Now In English
PM4RK5 writes: "For those of you interested, the News & Observer had an interview with Andrew Hunt about Ruby, in response to a book he and David Thomas authored. The book, "The Pragmatic Programmer" was written for the old-fashioned programmers who seek to learn how to use newer technologies, and use them better. It has an example of code differences between Java and Ruby, on how to print 'Ho Ho Ho.' Contains information and thoughts on its current applications, how its growing, and the types of things that it is suited for."
wow, it's weird to see a local rag doing such an in-depth article on programming. well done, N&O. (even weirder that it's my local rag, but, hey..)
since i know all 6 people who read this article are going to skim it for exactly the same thing i did, here it is:
To print "Ho Ho Ho" in Java, you have to write code like this: 'for (int i=0; i 3; i++)
{System.err.print("Ho ");}.'
In Ruby you write:
'3.times do print "Ho " end.'
Indie rock lives! b-side!
More interesting might be slides from last month's Ruby conference as well as a nice writeup with pictures. Wish I could've been there!
The newspaper article contains the Java/Ruby example. The book Pragmatic Programmer was written before they got involved in Ruby, and has no Ruby. To muddy the waters even more, their Ruby book is subtitled The Pragmatic Programmer's Guide, but it doesn't have Java comparisons. Someone will have to write a "Ruby for Java Programmers" book.
Judging from the code in the article, one of the things that would appear to hinder Ruby is its lack of closeness to other languages. Perl, Java, etc have at their heart, C. You can see this in the bracing uses, control structures, etc.
In the end, this may not be a "bad thing" for Ruby....
:q!