This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: What a Java Programmer Should Know About Ruby
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Jim Weirich has got a public list on Things a Java Programmer Should Know About Ruby.
This list does tell you a lot, although there are a few politically charged ones:
Fixed what's wrong with Perl
Fixes what's wrong with Python
It's super productive (like Perl, Python and Smalltalk)- maybe 5-10x Java.
Is a lot like Smalltalk, but doesn't look as funny
Is a lot like JavaScript, but more OO and more for full app development
Try to ignore those a little (no matter how you feel about any of them) and stick to the technical side.
Personally, I find myself smiling more when I write Ruby code. It just fits me well.
And I love items such as:
while line = gets do
puts "Found: #{line}" if line =~ /start/ .. line =~ /end/
end
The core items that help me out are:
Duck Typing: Thinking in terms of behaviour, versus strict typing via Class heirachies really helps me
Closures: I go on and on about this one I know. I just love the clean code that comes out of it.
Dynamic Typing: I just don't by in to the static typing way. Although I see some benefits, it gets in the way too much. And, as Dave Thomas puts it... Java isn't fully baked in this area as if it was, there would be nice need for ClassCastExceptions :)
Now, there are items in other languages that are also gems. I definitely miss IntelliJ when writing Ruby code :)