From: Garance A Drosehn Date: 2004-09-16T16:59:31+09:00 Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby? On Wed, 15 Sep 2004 23:54:51 +0900, Chris wrote: > > So the question for any hardcore Perl coders out there that have > converted to Perl (or are fluent in both) is: Is it really worth the > time? Are the paybacks there? And do you feel you've exceeded your > capabilities in Perl using Ruby? > > I perceive, from what I've read, that this could be the case. I learned perl well before ruby. I wouldn't say that I'm a hardcore perl programmer, but I had written some fairly long perl scripts. And I still work with perl, because that's what most of the other systems programmers here are familiar with. For me, I think it's just a question of "how I think". I usually have to start out on some script with either no idea what I'm doing, or with explicit instructions which turn out to be wrong (such as "the data will always be sorted, and in the correct order" -- only to find out the incoming data is usually in the exactly-wrong order...). So, whether ruby or perl, I start out to write one thing, and later find out that I need to change that considerably. When programming in perl, I end up with the script getting messier and messier. With ruby I manage to keep refactoring the problem fairly easy, so the script keeps looking better the more I have to work on it. I think this is partially because I used to do a lot with ObjectiveC, so it is pretty natural for me to use object-oriented tactics, if I have a language where that's easy to do. While I have done a lot with perl, I never did quite wrap my mind around how to write "object-oriented Perl". But writing Ruby seems very straightforward to me. YMMV... > [...] in my estimation, the paradigm in Ruby is > entirely different than in just about any other procedural language and > even from the OO aspects of Perl, C++ and Java. I know some programmers who do a fine job writing OO-perl, and end up with code that is quite readable. My attempts end up a mess. Maybe my brain is just wired wrong. Personally, I find C++ to be horrid. I do not consider it a usable OO language. That's just my opinion, of course. I have certainly read through a lot of C++ code where the author has absolutely no idea what OO programming is about. Java looks pretty reasonable in my opinion, but in my job I have no real reason to use it for anything. So, I haven't really tried to write anything major in it. The object-oriented language that I had a lot of experience with is Objective-C, in the days when NeXT Computers was still making hardware (12 years ago...). The combination of Objective-C and the InterfaceBuilder goes a long way to guiding the programmer so you really start to understand what OOP is about. You pick up what you should be trying to do with objects, and what you gain by doing it correctly. For me, coming from that Objective-C background, Ruby was easy to pick up. I have no background with Smalltalk, but I suspect that programmers who know that OO language would also find Ruby easy to pick up. -- Garance Alistair Drosehn = drosihn@gmail.com Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA