From: Tim Hammerquist Date: 2002-09-07T12:20:57+09:00 Subject: Re: Larry Wall's comments on Ruby Larry Wall wrote: [ snippage ] > For instance, I think it's a violation of the Beginner's > Principle of Least Surprise to make everything an object. To a > beginner, a number is just a number. A string is a string. They > may well be objects as far as the computer is concerned, and > it's even fine for experts to treat them as objects. But > premature OO is a speed bump in the novice's onramp. Phil Tomson graced us by uttering: > Personally, I like Ruby's scoping rules a lot better than > Perl's. > > Thoughts? > > Also, I think that everyting being an object is actually > helpful for beginners - It's much easier to pick up OO > programming ideas if you learn them first, I think. It also > tends to make things much more consistent. After nearly two decades of coding (yes, some of you have been doing it longer), I no longer claim to be able to twist my mind into the "Beginner" shape. In fact, I can't say I honestly give a single, solitary thought to how a beginner might perceive a given language, syntax, or construct. My primary concerns are: - Does it do what I need? - Does it do too much more than what I need? - Will my peers be able to understand what I'm doing? With these criteria, both Ruby and Perl fit my bill, so long as the "peers" reviewing the Perl code know Perl, and the "peers" reviewing Ruby code know Ruby. Most non-coders have trouble distinguishing between a "word" (in the linguistic sense) and "character-based representation of a word", much less Functional vs. Object-Oriented programming. So the question for Larry (IMHO) becomes: "As a language designer, how far back in the evolution of a programmer should I cater to?" But I'm not Larry, regardless of whether I agree with his decision. :) Today I heard a user attempt to explain a problem. "I was typing my project and MS Word told me I'd performed an illegal operation. I clicked OK and the window went away and when I opened up Word again, it wouldn't let me edit the file or delete it. I had to start all over." So MS Word had (predictably) crashed, leaving a swapfile and zombie filehandle in its wake. After (predictably) restarting Windows, the forsaken victim of a file entry could safely be removed. Of course these aren't the users Larry has in mind, but where _does_ he draw the line, I wonder? Do Larry's refinements on behalf of the beginner help me? Seldom. Do they hinder me? Seldom. Am I glad there's a clear-headed developer behind such a prolific and valuable language? Always. Perl's an exceptionally powerful functional language wearing an ugly, dirty, but passably OO mask. Ruby is a clean, powerful, and elegant OO language. It's not perfect, and it's not the answer to everything... but we haven't hit v2.x yet! Tim Hammerquist -- Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to make 10 ways to do something. :-) -- Larry Wall in <9695@jpl-devvax.JPL.NASA.GOV>