«前の日記(2006年02月12日) 最新 次の日記(2006年02月14日)» 編集

Matzにっき


2006年02月13日 [長年日記]

_ [Ruby] Why Ruby?

Pragmatic Programmersのひとり、Andy HuntがなぜRubyを選んだか、という話。

When people ask me what attracts me to Ruby, I have two answers:

First, more than any other language I’ve used, it stays out of your way. You don’t have to spend any effort “satisfying the compiler” as you would in C++, or even Java. These languages have an awful lot of noise and verbosity. You get used to it of course, but it’s pretty wearing over time.

Second, I can type in an absurd amount of code in Ruby and have it work the first time. Not 2-3 passes resolving any syntax issues, not 4-5 passes tracking down a bug or two. It just works. Ruby’s not perfect, by any means, it’s got dark corners to the language just like every other language. But it has a lot fewer of them. For the great majority of projects, the great majority of the time, it just works.

その理由はふたつ。「(コンパイラを満足させるのではなく)やりたいことを記述できる」から。もうひとつは「書いたらそのまま動く(ことが多い)」から。

魔法があるわけでもない。「ただ役に立つから」というのはPragmatic Programmersらしい判断基準だと思う。

追記

じゃあ、同じくらい便利そうなPythonはというと、

So I thought I’d take a look at Python and other emerging languages in that space, but none of them really grabbed me. Python in particular was a dissapointment; it seemed to have all the features I wanted and good library support, but the language always felt kinda clunky. There were odd bits of “oh, that’s for historical reasons” that showed through. Maybe it’s just personal taste, but I didn’t like it.

だって。なんとなく分かるような気がする。なんでだかPythonって私のあってほしいような言語じゃないんだよな。逆にPythonファンにとってはRubyが「なんか違う」言語なんだろうか。

_ [Ruby] WebプログラマはRailsに乗るべきか?

安藤さんにとりあげてもらえるのは幸いなことだ。昨年から今年にかけてRubyは(Railsのおかげで)キャズムを越えたような気がする。

ま、「生き残る言語」の仲間には入れてもらえたようだけれど、「今後も一線の言語」に残るためにはまだまだ努力が必要そうだが。

_ [言語] Language Design Is Not Just Solving Puzzles

PythonのデザイナーGuido van Rossumが「Python的でない」ので、複数行lambdaのアイディアを(再び)拒否した、という話。

言語デザインがパズルよりも難しいという点には同意する。また、複数行lambdaが現在のPythonの方針にうまくフィットしないというのも解る気がする。

でも、Haskellのインデントでダメな理由はよく分からないな。

Haskell は Python と同様にインデントでブロック構造をあらわすことが出来ます。インデント表記から明示的表記への変換規則は以下の通りです。
  1. where, let, do, of の後にブロックの開始を示す { を挿入する。
  2. その後、同様にインデントされた行はブロック内の式とみなし、 先頭に ; を挿入する。
  3. インデント量が減少した行にでくわすと、その行の先頭にブロックの終了を示す } を挿入する。

_ [OSS] 第7回アジアOSSシンポジウム

なるイベントに参加する。今回は招待側にチケットを用意してもらえるので大変ラクチンだ。いつもはチケットの手配が面倒なのよ。

ところで会場はマレーシアはクアラルンプールなのだが、ここの電源事情はどうなのだろう。ちょっと調べてみるとBfプラグの240Vのようなのだが。 Googleで調べた範囲内では、BやらB3やらCやらも「使える」と書いてあるページもあるし。

Cプラグは持ち歩いてるんだが、Bfはないなあ。買うと結構するしなあ。

伝聞情報では会場はネット接続に不自由するらしい。どうやってコネクションを確保するか。

あと、最大の懸念はスライドの用意。20日が〆切。


«前の日記(2006年02月12日) 最新 次の日記(2006年02月14日)» 編集