On Mon, 29 Jan 2001, Ben Tilly wrote: > But Matz was, by his own admission, copying from Perl > as one of his sources. Admittedly, it would be a > serious mistake to determine your opinion of Ruby > entirely from how well he copied, but it is IMHO > completely fair to judge the success of his borrowing > what he wanted to borrow from Perl. Yes -- which is why my comments were specifically about cases where people assume that certain things are intended to be copies of things from Perl when they aren't, or when they should be viewed as adaptations rather than copies. I wasn't talking about the (obviously much more vast) entirety of the relationship between Ruby and Perl. > In fact Larry Wall's understanding of why Perl is so > good at the set of scripting and glue problems that > people set it to is intertwined with the kinds of > syntax that he has in the language. Matz clearly > thinks that the two are not tightly interconnected > and has tried to separate them. > > It would be quite unfair IMNSHO to not comment on > whether or not Matz is correct. I didn't say that under no circumstances should anyone speculate on whether or not Matz is correct. If Matz gave me driving directions, I'd want to know whether or not they were correct. What I did say was ... well, see previous posts :-) > >The "#{...}" interpolation mechanism is a good example. > >I've seen a number of people, familiar with Perl, assume > >that this is strictly the equivalent of "$var"-style > >interpolation in Perl. They then perceive, incorrectly, > >Ruby's interpolation mechanism as having "extra" > >punctuation characters. (The slashdot piece we've been > >talking about did this, in so many words ["I can see the > >extra characters getting annoying"], but I've seen it > >elsewhere too.) > > It does more. True. But what is the most common use? > Inserting variables! But that's neither here nor there, when it comes to manifest misunderstanding/underappreciation of the mechanism. It won't do to say that because it's mostly used it to interpolate variables, it's therefore OK if people think it's a clumsy attempt to implement a variable-interpolating mechanism. > >Once these people realize that #{...} is not (just) for variable > >interpolation, they not only stop worrying about the "extra" > >characters but actually feel relieved that they don't have to do > >"@{[ $x + $y ]}" and such things. > > Personally I always used "...".($x + $y)."..." for that. > Conceptually far simpler and almost as few characters. > Another neat trick I have seen is to tie a hash and use > that. A better example (from me) would have been trying to get arbitrary expressions into here documents, which is where I've mostly seen (and used) the kind of workaround I was talking about. David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav