Michael J. Kazin Michael J. Kazin 7e2a2bec3feb298cf4ec4b15e0884354bb94ab06 Kevin R. Schmidt e4ad0654f93121d87424b6e3bce45cc9234b9e38 Purple over Orange: First glance at Ruby

Thursday, October 11, 2007

First glance at Ruby

I only took the 20-minute tutorial (I could run through it in 10 minutes) given on the official site, and I like it. It's fresh. Very smart, not too different from previous languages I've used such as C++ and Perl. And very powerful.

I won't go into details- you can find plenty of that elsewhere. I just wanted to share a great quote, that I found suggested Ruby's potential...
This method of not caring about the actual type of a variable, just relying on what methods it supports is known as “Duck Typing”, as in “if it walks like a duck and quacks like a duck…”. The benefit of this is that it doesn’t unnecessarily restrict the types of variables that are supported. If someone comes up with a new kind of list class, as long as it implements the join method with the same semantics as other lists, everything will work as planned.
Makes me wish I had checked out not only Ruby but also Python a long time ago.

Labels: , ,

0 Comments:

Post a Comment

<< Home