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