[#407] New feature for Ruby? — Clemens.Hintze@...

Hi all,

27 messages 1999/07/01
[#413] Re: New feature for Ruby? — matz@... (Yukihiro Matsumoto) 1999/07/01

Hi Clemens,

[#416] Re: New feature for Ruby? — Clemens Hintze <c.hintze@...> 1999/07/01

On Thu, 01 Jul 1999, Yukihiro Matsumoto wrote:

[#418] Re: New feature for Ruby? — gotoken@... (GOTO Kentaro) 1999/07/01

Hi

[#426] Re: New feature for Ruby? — gotoken@... (GOTO Kentaro) 1999/07/02

Hi,

[#440] Now another totally different ;-) — Clemens Hintze <c.hintze@...>

Hi,

21 messages 1999/07/09
[#441] Re: Now another totally different ;-) — matz@... (Yukihiro Matsumoto) 1999/07/09

Hi,

[#442] Re: Now another totally different ;-) — Clemens Hintze <c.hintze@...> 1999/07/09

On Fri, 09 Jul 1999, you wrote:

[#443] — Michael Hohn <hohn@...>

Hello,

26 messages 1999/07/09
[#444] interactive ruby, debugger — gotoken@... (GOTO Kentaro) 1999/07/09

Hi Michael,

[ruby-talk:00467] Re: Now another totally different ;-)

From: matz@... (Yukihiro Matsumoto)
Date: 1999-07-12 09:32:31 UTC
List: ruby-talk #467
Hi, 

In message "[ruby-talk:00464] Re: Now another totally different ;-)"
    on 99/07/12, Clemens Hintze <c.hintze@gmx.net> writes:

|You have done the same for e.g. `Hash#include?'. This method works
|also different than `Array#include?' or `Enumerable#include?'.

I agree that Hash#include? (key search) is little bit different from
Enumerable#include? (item search) in some digree, but not as far as
ordered indexing and hash access, I guess.

|Furthermore you have also a method `Hash#member?' which is directly
|coming from Enumerable, and did not work at all (at least I have not
|found a way to bring it to do some interesting)! Same for `index'.

Well,... I forgot to redefine them for Hash.  Thank you for
mentioning.  About Enumerable#index, it may be my mistake to include
index to Enumerable.

|So why do not the same for `[]'. In Perl we have different operators
|for Array and Hash: `[]' and `{}'. I don't like it!

Because.. Hash#[] is little bit too important and used too often to
have different meaning.

|And whether it has a different meaning or not, depends from your
|point of view! You may see it as: The method `[]' delivers the
|element stored under the index. Array elements are indexed by its
|position, Hash elements by its key, etc. So `[]' works equal to both
|classes. Or what do you think?

Hmm, I'm curious what others think about this matter.
Don't care?
                                                matz.

In This Thread