[#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,
[#427] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/02
On Fri, 02 Jul 1999, you wrote:
[#428] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/03
Hi,
[#429] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/03
On Sat, 03 Jul 1999, you wrote:
[#430] Re: New feature for Ruby?
— gotoken@... (GOTO Kentaro)
1999/07/05
Hi,
[#431] Re: New feature for Ruby?
— Clemens Hintze <c.hintze@...>
1999/07/07
On Mon, 05 Jul 1999, you wrote:
[#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:
[#452] Re: Now another totally different ;-)
— gotoken@... (GOTO Kentaro)
1999/07/11
Hi,
[#462] Re: Now another totally different ;-)
— matz@... (Yukihiro Matsumoto)
1999/07/12
Hello, there.
[#464] Re: Now another totally different ;-)
— Clemens Hintze <c.hintze@...>
1999/07/12
On Mon, 12 Jul 1999, you wrote:
[#467] Re: Now another totally different ;-)
— matz@... (Yukihiro Matsumoto)
1999/07/12
Hi,
[#468] Re: Now another totally different ;-)
— gotoken@... (GOTO Kentaro)
1999/07/12
In message "[ruby-talk:00467] Re: Now another totally different ;-)"
[#443] — Michael Hohn <hohn@...>
Hello,
26 messages
1999/07/09
[#444] interactive ruby, debugger
— gotoken@... (GOTO Kentaro)
1999/07/09
Hi Michael,
[#448] Re: interactive ruby, debugger
— "NAKAMURA, Hiroshi" <nakahiro@...>
1999/07/10
Hi,
[#450] Re: interactive ruby, debugger
— Clemens Hintze <c.hintze@...>
1999/07/10
On Sat, 10 Jul 1999, you wrote:
[#490] Some questions concerning GC in Ruby extensions — Clemens Hintze <c.hintze@...>
Hi matz,
6 messages
1999/07/14
[#501] Ruby 1.3.5 — Yukihiro Matsumoto <matz@...>
Ruby 1.3.5 is out, check out:
1 message
1999/07/15
[#519] CGI.rb — "Michael Neumann" <neumann@...>
Hi...
7 messages
1999/07/24
[#526] Another way for this? And a new proposal! — Clemens Hintze <c.hintze@...>
Hi,
6 messages
1999/07/25
[ruby-talk:00474] Re: Now another totally different ;-)
From:
gotoken@... (GOTO Kentaro)
Date:
1999-07-13 01:52:58 UTC
List:
ruby-talk #474
In message "[ruby-talk:00471] Re: Now another totally different ;-)"
on 99/07/12, Clemens Hintze <c.hintze@gmx.net> writes:
>>Of course, one can define `[]' via `each'. I can't ban doing that :-)
>
>That is not the point! Only Enumerable would do it that way (using
>`each'), as a new class includes module Enumerable has to implement an
>own `each' method on any case.
>
>Only If the new class DOESN'T implement an own `[]', then that thump
>one of Enumerable would be used and would offer a fall-back
>possibility.
I see. Your opinion also seems right. The matter to consider may be
the degree of benefit in daily programming. That is, how general
enumerable classes become convenient by Enumerable#[].
First, let's consider predefined classes. Those can be classified into
three groups:
(1) Enumerable && has []
(1.1) x.to_a[i] == x[i]
Array, Struct
(1.2) x.to_a[i] != x[i]
Hash, String
(2) Enumerable && !has []
Dir, File, IO, Range, Struct::Tms, Struct::Stat
(3) !Enumerable && has []
Bignum, Fixnum, Proc, Method, Thread, Match
Under my own criterion, Only File and Range are naturally will be held
x.to_a[i] == x[i]. IO and Dir are not suitable to be so, because IO
is nondeterministic, dir[i] is just not natural.
The above discussion may be not enough to decide to reject Cle's
Enumerable#[], but I feel such [] is too special yet.
>># Don't be fed up with my obstinacy, Cle.
>I am not fed up, be sure. Only I fear you will, Gotoken. :-}
I'm being amazed how many you you make new proporsals! =)
-- gotoken