Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Matzにっき(2006-06-01)
[go: Go Back, main page]

«前の日記(2006-05-31) 最新 次の日記(2006-06-02)» 編集

Matzにっき

<< 2006/06/ 1 1. Bitwise Magazine :: Ruby programming tutorial
2. Bitwise Magazine :: Ruby Programming
3. mandatory arguments after splat
2 1. 平成17年度情報化月間 第26回 U20プログラミングコンテスト
2. ZDNet.com オープンソースブログ:成功するオープンソースビジネスモデル7選
3. Ruby のブロックってオブジェクトじゃないよね。これって“驚き最小の法則”に反しない?
3 1. SANYO もちつきベーカリー
2. 引っ越し
3. バプテスマ会
4. 『ふつうのHaskellプログラミング
4 1. 第一安息日
5 1. マルチメディア通信と分散処理研究会 第127回 研究報告会
2. 東大での話
6 1. ベンチャーファンド
7 1. カバン
2. 地方銀行と海外通貨
3. 寄付
8 1. Alan Kayといっしょ
2. 秋葉原
3. オープンソースマガジン8月号
9 1. Interop
2. オープンソースマガジン8月号
3. 日本Rubyカンファレンス前夜祭
10 1. 巨大パッチ
2. 日本Rubyカンファレンス、発表、パネル
3. 日経Linux8月号
11 1. ファイアサイド
12 1. 原稿の苦しみ
2. スライド準備
3. 「趣味の言語からビジネスの言語へ」---日本初のRuby大規模イベント開催
13 1. 東大講演
2. 羽田まで
3. 「補償金もDRMも必要ない」--音楽家 平沢進氏の提言
14 1. 歯医者
2. 原稿完成
3. 「Linuxにもっと日本からのコードを増やすには?」
15 1. Pickaxe監修
2. Unicode対応
3. ":"とblock by indentation
16 1. 「地方自治体に金はない、残されているのは時間だけ」--長崎県
2. ECナビ、自社の研究組織「ECナビラボ」で、学生のインターンシッププログラムを開始
3. 「Google独占にはさせない」--国産検索エンジン開発へ、産学官が一致団結
17 1. 片づけ
2. タレントショー
3. ミュシャ
4. Little Book of Ruby
18 1. 日曜
2. 米子
3. 父の日
19 1. デバッグ
20 1. HT
2. エラトステネス
21 1. Rails講習会定員一杯
2. 「美しいコードを書けるからRubyを選んだ」---Ruby on Rails作者 David Heinemeier Hansson氏
3. Gardens Point Ruby.NET Compiler
22 1. Unicode
2. auto conversion
23 1. 商談
2. そば屋
3. 夫婦でペアプロ
4. RubyConf presentaion
24 1. 親子活動
2. Mixinと多重継承
3. 1.8.5 preview1
25 1. 日曜日
2. 異文化交流
3. ステーク連絡
26 1. Emacs過剰適応
2. スライド作成
27 1. Web 2.0の挑戦者:ニッチ商品も見つかる?リアルメディアの交換サイトlendmonkey - CNET Japan
28 1. 生まれた時からプログラマ☆興味と感性で世界を驚かす/Tech総研
2. Judy Arrays
29 1. 「オープンソースはボランティアではない」--サンのオープンソース責任者が講演 - CNET Japan
2. わからないこと
30 1. キルギス講演
>>
Dr.Web 予測するアンチウイルス 持ち込み PC 対策でお悩みの方にオススメです。
ウイルス・スパイウェア検査・駆除 用ツール Dr.WEB CureIt! を無償配布中!

2006-06-01 [長年日記]

_ [Ruby] Bitwise Magazine :: Ruby programming tutorial

Bitwise MagazineでのRubyの紹介。

Bitwiseについては「4月に紹介するからなんか一言」と言われていたのに、 ほったらかしにしてしまっていたのだった。 4月になっても出たという話を聞かないから「企画が没になったのかな」と 思っていたのだが、2ヶ月ほど遅れて登場した、ということらしい。

こっちはまあ、普通。

しかし、もう一本あるのだ。

_ [Ruby] Bitwise Magazine :: Ruby Programming

タイトルがふるっている。

Ruby programming's hidden treasure..? or a flawed gem..?

だそうだ。「Flawed」とは「偽の」とかいう意味だから、 「見かけ倒しの宝石(なの?)」という感じか。

まあ、「驚き最少の原則に反している」だの、 「全然シンプルな文法じゃない」だの、言いたい放題(笑)。

まあ、本当のことだけど。

ただ、「驚き最少の法則」は私が言い出したことじゃないんだけどなあ。 まあ、いつものことだよなあ。万人が驚かない言語なんて不可能だってば。 私自身は口にしないようにしてから3,4年は経つと思うんだけど、 まだこんなこと言われるんだよなあ。

さて、こんなにけちょんけちょんにけなしているように見えるのだが、 最後にはほめられているようだ。

Huw: Look, in all this discussion, it sounds as though both of us have been picking holes in Ruby. Anyone would think we didn’t like the language. That obviously isn’t true.

...obviously, both of us must feel that Ruby is a pretty interesting language. Let's wrap this up by trying to pick out the features that appeal to us. For myself, I think I'd say that it's the combination of reasonably thorough object orientation with a lightweight syntax. In my experience, Ruby is the most truly OOP language I've ever used with the sole exception of Smalltalk. Now, I am not completely obsessed with OOP - but it seems to me that either a language should do object orientation properly or it should leave it alone. Having decided to go for OOP, at least Ruby has, unlike most other supposedly `OOP languages' done it thoroughly. And, unlike Smalltalk, it has a simple syntax and isn't weighed down by being embedded into a hermetically sealed world \u2013 the entire environment that Smalltalk is obliged to carry around with it. In short, Ruby is, in principle, a perfect Rapid Application Development language.

Dermot: I'd agree there. Ruby is one of the most interesting languages around - certainly, the most interesting that I've seen in a long time. It makes a pleasant change from the endless variations of the C syntax that seem to come out (C++, Java, C# and so on). I particularly like the fact that while it is indeed object oriented, you don't need to know that to do simple stuff: I think mixins are brilliant!

さて、最後に面白かったところを二ヶ所ほど引用しておこう

And while I complain about the syntax (I’ve lost count of the number of times that I’d like to do something unpleasant to Matz!), writing a parser for Ruby, as I've been doing, is a whole lot different from using the Ruby language itself to do something useful.

なんだかおっかないことが書いてある。bitwise編集部には近づかないようにしよう。

Now that's a strange thought - could Ruby be the new VB?

「新たなVBとしてRubyを」ってことだけど、彼はVBの前の名前がRubyだったと知ったらどう思うだろうか。単なる偶然だけど。

_ [Ruby] mandatory arguments after splat

前にも書いた

def foo(a,*b,c)
end

のようなコードを実現した。ノードを変えちゃったので、 ripperやyarvへの対応が必要だけど、現時点ではほったらかし。

なかなか便利な気がする。オプションハッシュの取り出しとか。

本日のツッコミ(全8件) [ツッコミを入れる]
_ ささだ (2006-06-06 20:45)

どんなふうに便利かよくわからないので、解説希望です。

_ まつもと (2006-06-06 22:52)

RCR315を参照してください
http://www.rcrchive.net/rcr/show/315

オプションハッシュを一番最後の引数として取り出したいとき、[]=メソッドで代入する値を取り出すときなどを想定しています。

_ otsune (2006-06-07 07:17)

>私自身は口にしないようにしてから3,4年は経つと思うんだけど、まだこんなこと言われるんだよなあ。

2002年のスライドでMatzさんが発表した発言を明確に打ち消していない(ですよね?)のに、「口にしないようにしている」だけでボヤくのはちょっと後だしジャンケン気味だなぁと思います。

_ まつもと (2006-06-07 07:22)

ruby-talkをはじめとして何度も打ち消してると思います。
まあ、「私は〜してるのにまだわからないとは何事か」というニュアンスじゃなくて、「〜してても、何年経ってもやっぱり言われちゃうのね」という「ボヤき」なんで、勘弁していただきたく。

_ 匿名 (2006-06-07 10:29)

flawは宝石の傷

_ まつもと (2006-06-07 10:46)

おお、では、「傷物の宝石」というのが適切な訳なんですね。
ありがとうございます。

_ otsune (2006-06-07 11:45)

>ruby-talkをはじめとして何度も打ち消してると思います。
おお、それは知りませんでした。失礼しました。
コメント前に「PoLS Ruby」「Ruby principle of least surprise」でGoogle検索してみましたが、かなり根強く広まった原則になっていますね…… Wikipediaとか。
もっとすごい事に「驚き最少」で検索すると2002年のスライドしか引っかからない。

_ まつもと (2006-06-07 15:06)

広まってますねえ。たとえばcomp.lang.ruby FAQ 2.6を参照してください。
http://rubyhacker.com/clrFAQ.html

あと、「Principle of Matz's Least Surprise」と言われることもあります。
こっちは打ち消してません。だって事実だもの。

お名前:
E-mail:
コメント:
本日のリンク元
検索

«前の日記(2006-05-31) 最新 次の日記(2006-06-02)» 編集

RSS feed meter for http://www.rubyist.net/~matz/ Creative Commons License This work is licensed under a Creative Commons License.