[#8168] {literal}#[]= — EGUCHI Osamu <eguchi@...>

えぐち@エスアンドイーです。

16 messages 1999/11/01
[#8172] Re: {literal}#[]= — matz@... (Yukihiro Matsumoto) 1999/11/01

まつもと ゆきひろです

[#8176] Multiple self assignment — Kazuhiro Yoshida <moriq.kazuhiro@...>

もりきゅうです。

35 messages 1999/11/01
[#8178] Re: Multiple self assignment — matz@... (Yukihiro Matsumoto) 1999/11/01

まつもと ゆきひろです

[#8212] Re: Multiple self assignment — Kazuhiro Yoshida <moriq.kazuhiro@...> 1999/11/02

もりきゅうです。

[#8213] Re: Multiple self assignment — matz@... (Yukihiro Matsumoto) 1999/11/03

まつもと ゆきひろです

[#8232] 例外を処理する 2 項演算子 — Kazunori NISHI <kazunori@...> 1999/11/05

西@九大です。

[#8233] Re: 例外を処理する 2 項演算子 — matz@... (Yukihiro Matsumoto) 1999/11/05

まつもと ゆきひろです

[#8236] Re: 例外を処理する 2 項演算子 — Kazuhiro Yoshida <moriq.kazuhiro@...> 1999/11/05

もりきゅうです。

[#8266] Re: 例外を処理する 2 項演算子 — EGUCHI Osamu <eguchi@...> 1999/11/07

えぐち@エスアンドイー です。

[#8269] Re: 例外を処理する 2 項演算子 — gotoken@... (GOTO Kentaro) 1999/11/07

In message "[ruby-dev:8266] Re: 例外を処理する 2 項演算子"

[#8271] Re: 例外を処理する 2 項演算子 — matz@... (Yukihiro Matsumoto) 1999/11/08

まつもと ゆきひろです

[#8274] Re: 例外を処理する 2 項演算子 — keiju@... (石塚圭樹) 1999/11/08

けいじゅ@日本ラショナルソフトウェアです.

[#8204] Re: [ruby-list:18281] Re: アクセス制御について — Shugo Maeda <shugo@...>

前田です。

12 messages 1999/11/02
[#8205] Re: [ruby-list:18281] Re: アクセス制御について — Shin-ichiro Hara <sinara@...> 1999/11/02

原です。

[#8315] Re: [ruby-list:18601] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Kazunori NISHI <kazunori@...>

西@九大です。

37 messages 1999/11/15
[#8316] Re: [ruby-list:18601] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — matz@... (Yukihiro Matsumoto) 1999/11/15

まつもと ゆきひろです

[#8369] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Koji Arai <JCA02266@...> 1999/11/18

新井です。

[#8374] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — matz@... (Yukihiro Matsumoto) 1999/11/18

まつもと ゆきひろです

[#8384] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Koji Arai <JCA02266@...> 1999/11/19

新井です。

[#8405] 1.4.3 (Re: Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{}) — matz@... (Yukihiro Matsumoto) 1999/11/24

[#8319] Re: Exception handling — Jun Adachi <adachi@...>

安達@沖データと申します。

21 messages 1999/11/16
[#8350] Re: Exception handling — Kazunori NISHI <kazunori@...> 1999/11/17

西@九大です。

[#8446] [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...>

西@九大です。

37 messages 1999/11/29
[#8449] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/11/30

まつもと ゆきひろです

[#8463] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/11/30

西@九大です。

[#8474] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/12/01

まつもと ゆきひろです

[#8476] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/12/01

西@九大です。

[#8487] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/12/02

まつもと ゆきひろです

[#8494] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/12/02

西@九大です。

[#8451] new Hash (Re: [ruby-list:19043]) — Wakou Aoyama <wakou@...>

青山です。

18 messages 1999/11/30

[ruby-dev:8259] Re: [ruby-list:18468] Re: Array doesn't include Comparable

From: ttate@...
Date: 1999-11-06 21:04:39 UTC
List: ruby-dev #8259
立石です。

;; ruby-devに持ってきました。

Date: Sun, 7 Nov 1999 03:12:23 +0900
From: Koretsugu Daigoro <tmmcross@hk.airnet.ne.jp>
tmmcross> [ruby-list:18467] Array doesn't include Comparable
tmmcross> > Array#<=> が定義されてるのに not Array < Comparable なのは何か理由があ
tmmcross> > りましたっけ?
tmmcross> >     [1, 2] > [0, 3] #=> NameError: undefined method `>' for [1, 2]:Array
tmmcross> > って,何か悲しい....
tmmcross> 
tmmcross> Array は全順序ではないから、
tmmcross> というか比較できない場合があるから……かな?

やっぱり(?)Enumerable#<=> があるのは何か変な気がしますし、メソッドと
モジュール名を見た時にEnumerableとComparableの違いがなんかすっきりし
ないです。

Enumerableはeachをもとにしたメソッドのみを対象にすべきではないかと思
います。で、Comparableは<=>をもとにしたメソッドのみで構成する方が使う
ときにも単純ではないでしょうか?

具体的にはEnumerable#max,min,sortはComparableへ移った方がいいような気
がします。で、Enumerable#first,lastがあると良いかなぁと、、、

;; Ruby本(P.236)で見るとやっぱり変な気がしてきてしまった、、、(^^;

			Takaaki Tateishi <ttate@jaist.ac.jp>

In This Thread

Prev Next