Array question

I’m not totally disagreeing, and I’m not sure that we should just add
things because we can. BUT, my question here was why something
like that would feel awkward to the original poster? It won’t change
a single thing in his existing code, nor force him to do anything
different in the future. It is, for all intents and purposes,
invisible.

···

— Yukihiro Matsumoto matz@ruby-lang.org wrote:

Hi,

In message “Re: Array question” > on 03/03/29, Michael Campbell michael_s_campbell@yahoo.com > writes:

out of curiosity, why would a block to #join be awkward? It’s
wholly
additive to the library, it doesn’t break any existing code, and
anything you write could just as easily not use it.

Somehow, I feel feeping creaturism here.


Do you Yahoo!?
Yahoo! Platinum - Watch CBS’ NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

What a very silly, very American joke.

Matz, you can never again say you don’t
speak English well… :wink:

Cheers,
Hal

···

----- Original Message -----
From: “Yukihiro Matsumoto” matz@ruby-lang.org
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, March 28, 2003 10:36 AM
Subject: Re: Array question

Hi,

In message “Re: Array question” > on 03/03/29, Michael Campbell michael_s_campbell@yahoo.com writes:

out of curiosity, why would a block to #join be awkward? It’s wholly
additive to the library, it doesn’t break any existing code, and
anything you write could just as easily not use it.

Somehow, I feel feeping creaturism here.

My opinion only.

It’s an obscure feature, very rarely needed,
and it is not intuitive that such a feature
would even be there.

There are many methods that don’t take blocks.
They could all be revised so that they in
effect modified the receiver or did a map in
some way before doing their real job.

I wish there were a way to measure “usefulness”
of a feature and “complexity” of the interpreter
in a totally objective way.

Then I would say that the increase in usefulness
has to equal or exceed the increase in complexity
in order for a change to be viable.

Cheers,
Hal

···

----- Original Message -----
From: “Michael Campbell” michael_s_campbell@yahoo.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, March 28, 2003 11:58 AM
Subject: Re: Array question

— Yukihiro Matsumoto matz@ruby-lang.org wrote:

Hi,

In message “Re: Array question” > > on 03/03/29, Michael Campbell michael_s_campbell@yahoo.com > > writes:

out of curiosity, why would a block to #join be awkward? It’s
wholly
additive to the library, it doesn’t break any existing code, and
anything you write could just as easily not use it.

Somehow, I feel feeping creaturism here.

I’m not totally disagreeing, and I’m not sure that we should just add
things because we can. BUT, my question here was why something
like that would feel awkward to the original poster? It won’t change
a single thing in his existing code, nor force him to do anything
different in the future. It is, for all intents and purposes,
invisible.

Hi,

···

In message “Re: Array question” on 03/03/29, “Hal E. Fulton” hal9000@hypermetrics.com writes:

Somehow, I feel feeping creaturism here.

What a very silly, very American joke.

Matz, you can never again say you don’t
speak English well… :wink:

Credits should go to Larry Wall. I learned computer English from
reading the Camel book, especially glossary appendix.

						matz.

My opinion only.

It’s an obscure feature, very rarely needed,
and it is not intuitive that such a feature
would even be there.

And how does that make it “awkward”? That’s all I’m asking. EVERY
feature is going to be intuitive for some and not others, so I don’t
think that that’s relevant.

I find it awkward that many ! methods return nil sometimes STRICTLY
so that I can’t chain them.

Again, I’m not arguing for its insertion to the library; I can add it
myself if I need it. I’m simply (still) curious as to why anyone
would consider this some hinderance to their coding.

Or am I misreading “awkward”?

I’ll shut up on it now, as it’s not really worth the discussion.

···

Do you Yahoo!?
Yahoo! Platinum - Watch CBS’ NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

My opinion only.

It’s an obscure feature, very rarely needed,
and it is not intuitive that such a feature
would even be there.

And how does that make it “awkward”? That’s all I’m asking. EVERY
feature is going to be intuitive for some and not others, so I don’t
think that that’s relevant.

I don’t think it’s awkward to use. I think it’s
a flawed design if it finds its way into the core.
That’s what I mean here by awkward, though I can’t
speak for the original poster.

An “antifeature” may be easy to use, but it makes the
interpreter bigger and slower, and it clutters the
documentation.

I like interfaces to be simple and elegant and sensible.
My pest control guy kills the bugs. That’s all. I don’t
want an arrangement where, if I buy him lunch, he will
paint my house for me as well. It’s sort of a separation
of concerns issue.

I find it awkward that many ! methods return nil sometimes STRICTLY
so that I can’t chain them.

So do I. I am bitten by this over and over. I have
considered writing my own variants of them, but I
concluded that would be a mistake (unless I named
them creatively perhaps).

Again, I’m not arguing for its insertion to the library; I can add it
myself if I need it. I’m simply (still) curious as to why anyone
would consider this some hinderance to their coding.

Or am I misreading “awkward”?

Again, only speaking for myself. The usage of the
construct itself is not awkward. It doesn’t break
any old code. It would produce some readability
issues for those used to older versions of Ruby,
but that’s how it goes.

The real issue to me is that the very presence of
such a feature would be an awkwardness. To make a
silly analogy, it’s as if someone painted a version
of the Mona Lisa with earrings added, and said, “The
earrings don’t detract from her smile, of course.”

No, but they change the whole thing subtly, and they
don’t add enough to justify their presence.

I’ll shut up on it now, as it’s not really worth the discussion.

Maybe not, but it’s more fun than income taxes.

Cheers,
Hal

···

----- Original Message -----
From: “Michael Campbell” michael_s_campbell@yahoo.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, March 28, 2003 2:43 PM
Subject: Re: Array question

I like interfaces to be simple and elegant and sensible.
My pest control guy kills the bugs. That’s all. I don’t
want an arrangement where, if I buy him lunch, he will
paint my house for me as well. It’s sort of a separation
of concerns issue.

···

----- Original Message -----
From: “Hal E. Fulton” hal9000@hypermetrics.com


No one’s asking you to buy him lunch, Hal. But if Walter needs his house
painted…

:slight_smile:

I respectfully disagree, but it’s such a minor point, especially as the
"work-around" is also a one-liner.

In general, I would add things like this. Matz has a different view; an
interesting one which, if I don’t fully understand it, I can certainly
appreciate it. He says something like “This isn’t what #join means,” almost
like he’s referring to the platonic form of “join”. Remember the suggestion
for Hash#+ to work like update, but returning a new hash? Matz was for the
idea, but didn’t want to call it “+” because update can mask certain
key-value pairs and he didn’t feel like that properly captured the spirit of
what “+” is all about. (Or something like that.)

How fascinating! Again, I think I would have gone ahead with it, but you
have to admire that attitude, and the great language we have as a result.

This sort of “purity of essence” idea which runs through all of Ruby seems
vaguely at odds with Paul Graham’s “allow the programmer to do everything”
(an admittedly liberal interpretation of his “write a language for brilliant
programmers” idea), though I have difficulty defining just how… things
like disallowing multiple inheritance. (I’m not complaining about it! Just
saying.)

Chris

In general, I would add things like this. Matz has a different view; an
interesting one which, if I don’t fully understand it, I can certainly
appreciate it. He says something like “This isn’t what #join means,”
almost
like he’s referring to the platonic form of “join”. Remember the
suggestion
for Hash#+ to work like update, but returning a new hash? Matz was for
the
idea, but didn’t want to call it “+” because update can mask certain
key-value pairs and he didn’t feel like that properly captured the spirit
of
what “+” is all about. (Or something like that.)

That’s an interesting analysis. I can’t speak for Matz, but
I admit I’m a closet Platonist. This came out when I was
discussing (human) languages with a friend the other day.
As it turned out, he thinks of a “word” as being a spoken
sound, and the written word is only a representation of it.
Me, I think that a spoken word is only a noise, and a
written word is only a scribble; but behind them both (and
yet not pure concept, not language-independent), there is
the Word which is represented by both the noise and the
scribble.

How fascinating! Again, I think I would have gone ahead with it, but you
have to admire that attitude, and the great language we have as a result.

Yes, it’s hard to argue with success. And I don’t mean
commercial success or popularity, but technical and
aesthetic excellence.

This sort of “purity of essence” idea which runs through all of Ruby seems
vaguely at odds with Paul Graham’s “allow the programmer to do everything”
(an admittedly liberal interpretation of his “write a language for
brilliant
programmers” idea), though I have difficulty defining just how… things
like disallowing multiple inheritance. (I’m not complaining about it!
Just
saying.)

I’ve struggled with this also. So far the best explanation
I have is in the words of Steven Wright: “You can’t have
everything. Where would you put it?”

Even Paul Graham has concepts of what a LISP dialect ought
to be, ought to have. And once you say what should be put in,
you are at least implicitly saying that everything else
should be left out.

Hal

···

----- Original Message -----
From: “Chris Pine” nemo@hellotree.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, March 28, 2003 7:31 PM
Subject: Re: Array question