[ruby-talk:02444] Re: Iterator into array

From: "Conrad Schneiker" <schneiker@...>
Date: 2000-04-11 07:02:00 UTC
List: ruby-talk #2444
From: Andrew Hunt
>     >It's still possible to introduce a new syntax for collecting yielded
>     >values, but we should not in a hurry to change the syntax.
>                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     >                            matz.
> Agreed!  We could add bells and whistles until Ruby starts to look
> like some other, well-known, bloated languages, but I don't think
> that's a good idea.
>
> On the other hand, adding neat features as libraries (that do not
> modify the core language) is valuable and helps show how
> expressive the language can be.

Well, I think Dave's intended capability is not just another bell and
whistle. The suggest alternatives looked sort of kludgy to me. I think that
what Dave wants an elegant way of doing is Ruby is a generally important
idea with a generally important application that ought to be widely emulated
in Ruby documentation. Not quite killer app stuff, but still pretty
important. And I think this is something that may turn out to be useful for
test programs and such as well.

As for Perl, I don't think its main problem is bloat per se, but that it has
too many tricky areas where things don't really fit together very well,
which makes for too many tricky ways of doing things and thus too many ways
to inadvertently foul up. In fact, I think that to a certain extent, Perl's
so-called bloat somewhat helps to overcome the limitations of unfortunate
early design decisions. Unlike some languages that were born bloated,
so-called bloaIt has helped make Perl a very powerful and useful language in
spite of itself, and is actually a reflection of Perl's success, aesthetic
considerations notwithstanding. If not looking like Perl is a more serious
concern than worthiness of features, let's start by ripping all the
Perl-derived regular expression extensions out of Ruby, as well as the
several other useful Perl features that found their way into Ruby. :-)

In Ruby's case, I don't think there is any inherent problem with Ruby
becoming feature-rich (to invert the prejudicial term bloat) _if_ this
occurs in a natural and harmonious fashion.

So I think it would be good thing for Ruby if we could find some suitable
syntax extension "for collecting yielded values".

Conrad




In This Thread