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.Labels: compsci, programming, ruby
0 Comments:
Post a Comment
<< Home