From: Matt Armstrong Date: 2001-11-13T09:24:41+09:00 Subject: [ruby-talk:24964] Re: Linux Magazine article Dave Thomas writes: > Andy & I've been asked to write a feature article about Ruby for > Linux Magazine (www.linux-mag.com). > > I want to make this an upbeat article, featuring Ruby's strengths, > and not other language's weaknesses. So, a quick poll request: what > features of Ruby do you think would most impress or excite someone > who hasn't used the language yet? What small applications would whet > people's appetites? Thinking back to not-that-long-ago when I first checked Ruby out, the following impressed me. The first item is what got me to keep looking at the language and allowed me to discover the rest. - Enough of it was similar enough to Perl that I felt comfortable: regexp syntax (including =~, !~, etc.), "statement if condition", use of $_, names of many of the methods, etc. - The code examples seemed devoid of weird perl-like syntactic noise (except for regexps, which are inherently ugly). I think this will just speak for itself in your article's example code. - Power of blocks, especially in conjunction with iterators and Enumerable methods, and especially for resource management (e.g. File.open(..) { |f| ... }). - Exception handling is simple, intuitive and clean. - Extremely easy to create a class. And after further digging: - The friendliness of the Ruby community -- I think Matz gets a lot of credit for this by being a consistently available and nice guy who refuses to get into ideological debates and language wars. ;-) - Language is still being actively developed -- it isn't dead. And I'll point out some things that others often say are cool about Ruby but I didn't care about: - Totally object oriented. To me, this is not a virtue in itself, though the benefits it brings are. This isn't something I was specifically looking for though. - Totally dynamic. I don't care much that you can add/change methods to/of a class or even a single object at "run time" (or, rather, that there is no distinction between "compile time" and "run time"). I've found it useful a few times, but this isn't something I was looking for when I found Ruby. I was just looking for a replacement for Perl that was easier to read and maintain. -- matt