[#37041] [ANN] Exerb/Exerb-CC 2.6.0 — Yuya Kato <yuya-ml@4th.to>
未踏ユース終了まで1ヶ月を切って、焦り気味のYuyaです。
27 messages
2003/02/02
[#37074] Re: [ANN] Exerb/Exerb-CC 2.6.0
— Satoshi Osabe <s-osabe@...>
2003/02/09
長部と申します。
[#37096] Re: [ANN] Exerb/Exerb-CC 2.6.0
— Satoshi Osabe <s-osabe@...>
2003/02/11
長部です。
[#37202] Re: [ANN] Exerb/Exerb-CC 2.6.0
— "TOYOFUKU Chikanobu" <toyofuku@...>
2003/03/02
豊福です。
[#37206] Re: [ANN] Exerb/Exerb-CC 2.6.0
— Yuya Kato <yuya-ml@4th.to>
2003/03/04
Yuyaです。
[#37208] Re: [ANN] Exerb/Exerb-CC 2.6.0
— Satoshi Osabe <osabe@...>
2003/03/04
長部と申します。
[#37209] Re: [ANN] Exerb/Exerb-CC 2.6.0
— nobu.nakada@...
2003/03/04
なかだです。
[#37211] Re: [ANN] Exerb/Exerb-CC 2.6.0
— "U.Nakamura" <usa@...>
2003/03/04
こんにちは、なかむら(う)です。
[#37047] String#each_byte — Take_tk <ggb03124@...>
たけ(tk)です
12 messages
2003/02/04
[#37050] Re: String#each_byte
— Tietew <tietew-ml-ruby-list@...>
2003/02/04
[#37052] 改行が認識されない? — 金光雅夫 (KANEMITSU Masao) <masao-k@...>
金光です。どもっ。
6 messages
2003/02/04
[#37058] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
27 messages
2003/02/05
[#37059] Re: Local variables & blocks
— ichimal@...
2003/02/06
皆様、初めまして鈴木です。
[#37063] Re: Local variables & blocks
— matz@... (Yukihiro Matsumoto)
2003/02/07
まつもと ゆきひろです
[#37110] Re: Local variables & blocks
— ichimal@...
2003/02/16
鈴木です。
[#37115] Re: Local variables & blocks
— Tanaka Akira <akr@...17n.org>
2003/02/17
In article <200302161629.h1GGTvJ5008901@fenix.ne.jp>,
[#37123] 私はこれにハマリました。
— Shin-ichiro HARA <sinara@...>
2003/02/18
原です。
[#37065] UDPから受信出来ない。 — Toru MITANI <toru@...>
6 messages
2003/02/07
[#37081] setup.rb: Patch to ignore CVS,*~,... — "Shirai,Kaoru" <shirai@...>
白井です。
13 messages
2003/02/10
[#37082] Re: setup.rb: Patch to ignore CVS,*~,...
— Minero Aoki <aamine@...>
2003/02/10
あおきです。
[#37083] Re: setup.rb: Patch to ignore CVS,*~,...
— "Shirai,Kaoru" <shirai@...>
2003/02/10
白井です。
[#37084] Re: setup.rb: Patch to ignore CVS,*~,...
— Minero Aoki <aamine@...>
2003/02/10
あおきです。
[#37085] Re: setup.rb: Patch to ignore CVS,*~,...
— "Shirai,Kaoru" <shirai@...>
2003/02/10
白井です。
[#37114] 配列とべき集合 — Masahiro Sato <msato@...>
7 messages
2003/02/17
[#37135] TMailと..なFrom行 — ICHIKAWA Manabu <ichikawa@...>
市川ともうします。
5 messages
2003/02/19
[#37153] rubyからJavaScriptの関数を起動する方法は? — "Masakazu Fujimoto" <masakazu@...>
8 messages
2003/02/23
[#37162] Rubyの10年 — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
9 messages
2003/02/24
[#37171] setup.rb 3.1.4 — Minero Aoki <aamine@...>
あおきです。
7 messages
2003/02/25
[#37179] — "松尾尚典" <matsuo.hisanori@...>
松尾です。こんばんは。
10 messages
2003/02/25
[ruby-list:37058] Re: Local variables & blocks
From:
matz@... (Yukihiro Matsumoto)
Date:
2003-02-05 10:07:48 UTC
List:
ruby-list #37058
まつもと ゆきひろです
In message "Re: Local variables & blocks"
on 03/02/05, Yukihiro Matsumoto <matz@ruby-lang.org> writes:
||>Hmm, this is interesting issue. If you're OK, shall we discuss at the
||><ruby-list@ruby-lang.org> list in Japanese?
||
|| I'm Okay.
|
|OK, let's move. Honestly, it's kinda hard for me to discuss.
ということで、引っ越してきました。やはり英語で難しいことを話
すのはツラいです。
元々はnilが偽なのは良くないのでは、という話です(末尾参照)。
Schemeでは「未初期化の変数値」である#<undef>(Gaucheの場合)は
偽ではなく真です。だから、Rubyでもそうあるべきでは、という主
張なのだと理解しました。
それに対する私の返答は
* RubyはRuby、SchemeはSchemeなので、Schemeの#<undef>が真だ
からといってRubyのnilが真でなければならない理由にはなら
ない。
というものです。さらに言えば(ruby-talkでは書かなかったけど)、
* nilを真にするというのは(Schemeでなく)Lispの伝統に反する。
* 互換性で大問題が起きる
* nilは3値論理(真、偽、未定義)を表現するのに都合が良い
などの状況もあります。ということで、nilを真にすることも、nil
を唯一の偽の値にすることもRubyについてはありえないかなあと考
えています。ちなみに昔はnilは唯一の偽値でした。
とはいうものの、「#<undef>は偽であってはならない理由」という
のに興味はありますから(R5RSにも理由の説明はないし)、ぜひとも
聞きたいなあと思っているのです。
まつもと ゆきひろ /:|)
In message "Re: Local variables & blocks"
on 03/02/05, ichimal@fenix.ne.jp <ichimal@fenix.ne.jp> writes:
|
|Hi,
|
|In message "Re: Local variables & blocks"
| on 03/02/04, matz writes:
|
|>Hmm, this is interesting issue. If you're OK, shall we discuss at the
|><ruby-list@ruby-lang.org> list in Japanese?
|
| I'm Okay.
|
|>|>What's wrong with that?
|>|
|>| Is it meaning that Scheme is just Scheme, Ruby is just Ruby?
|>
|>Maybe. Scheme is not an excuse for me. I'm interested in whether
|>there's any other reason to "separate false and nil".
|
| I think, nil in Ruby is representative value of "{unavailable|invalid|
|no effect} in this context" rather than "not initialized".
|
| I think, following representation is valid:
| a variable points to nil.
|
| But following representation is not good:
| a variable points to non-initialized value.
|It should be: a variable is not initialized.
|
|# But, we can initialize a variable with non-initialized value
|# explicitlly by tricky way s.t. (set! x (if #f #f)) in scm, and it
|# should not be forbidden. It's programmer's responsibility.
|## Note for reader who don't know scm:
|## (set! x (if #f #f)) => #<unspecified>,
|## (set! x #<unspecified>) => error.
|## It may be great policy. This is why I said "tricky way".
|
| Then, the semantics "nil is also false" restricts the meaning of
|{unavailable|invalid|no effect}. It's default value of the default
|value for {unavailable|invalid|no effect} but the default^2 shuold
|belong to programmer, not to PL, I think.
|
| e.g.
| def questionnaire
| print_somewhat_Q
| str = gets
| parse_answer(str) if str
| end
|
| This method should return nil as "non-effective answer" or somewhat
|effective answer including boolean. When a programmer sets the default
|answer to false, the programmer may save an extra test because "nil is
|also false" :-P
|
|Thanks.
|
|----
|1002.(ichimal)
|SUZUKI Shingo.