ビジネス WinDbg入門 アクティブなスレッドと非アクティブなスレッド


C言語ファミリ普及の背景
Bjarne Stroustrup氏(Mr.BS)のインタービュー記事を読む第2回目の今回は、次のインタビュー記事の第1トピックを読みます。

2000年7月インタービュー記事


3者鼎談の司会者であるHerb Sutter氏は、次のような質問をお三方に尋ねています。英語を苦手とする人は本記事一読後、辞書を引きながら、自分なりの解釈を試みてください。

・Why has the C family languages become so successful and so widely used?

この質問は、C言語ファミリが普及した原因を尋ねています。それでは、3人の回答をみてみましょう。

Dennis Ritchies氏の回答:
それはミステリである。考えられるとすれば、次のような点である。
・1970-1980年代は、Unixの共通言語はCであった(参考文献)。
・UnixとC言語は特定の集団向けのものではなかった。
・C言語は(アセンブラーやBなどの言語と比較すると)抽象化が進み、移植性が高かった。
・C言語の仕様は実装が容易なものであった。

Bjarne Stroustrup氏の回答:
・CとC++は、flexible、cheap、そして、efficientであった。
・Cの普及はUnixの存在が大きかった。
・C++は高度なC互換性を維持していたため、普及した。
・JavaはCとC++とは異なる言語である。
・Javaは出荷当時から開発者だけではなく、企業内の一般個人への普及も目指した。

James Gosling氏の回答:
・C言語ファミリは現実的なソルーションの実装を可能としていた。
・C言語ファミリは実験的な性質を帯びていなかった。
・C言語は、OS記述言語としてその地位を不動のものにした。

3人の回答を一読すると、C言語の歴史的な重要性がいまさらのように浮かび上がります。しかし、設計者であるRitchie氏の発言からわかるように、設計者本人は、"どうして普及したのだろう?"という程度の感慨を持っているにすぎません。彼が見ていたのは、おそらく、ユーザ(プログラマ)ではなく、彼の前に置かれた計算機だったのでしょう。3人の回答は、3人の個性を見事に表現しています。

後の連載回ではっきりすることですが、Ritchie氏は物理学に興味を持っています。これは筆者の推測ですが、自分が設計したプログラミング言語Cを、そのユーザであるプログラマに説明することに同氏はそれほど熱心ではなかったのでしょう。実際最初にCのチュートリアルを書いたのは、Brian Kernighan氏です。また、Ritchie氏は、C言語の標準化作業にほとんど参加していません。対照的に、C++の設計者であるStroustrup氏はC++標準化作業に熱心に取り組み、標準化委員会の会合にはほとんど出席しています。

Cの弱点を補うように登場したC++。この言語があれば、Javaは不要では?、という議論があっても(技術的には)不思議ではありません。C++を設計したStroustrup氏の立場からすれば、C++にその根を置きながら、C++の弱点をことごとく批判するJava陣営に不満を持っても不思議ではありません。なぜJavaが登場し多くの人の支持を受けたのでしょうか?3人の議論はさらに深まっていきます。

追記:

Low-level access plus abstraction:
The original conception of C++, "C-like for systems programming plus Simula-like for abstraction," is a most powerful and useful idea (§7.1, §9.4).
A useful tool:
To be useful a language has to be completeand fit into the work environments of its users. It is neither necessary nor sufficient to be the best in the world at one or two things (§7.1).
Timing:
C++ was not the first language to support objectoriented programming, but from day one it was available as a useful tool for people to try for real-world problems.
Non-proprietary:
AT&T did not try to monopolize C++. Early on, implementations were relatively cheap (e.g.,$750 for educational institutions) and in 1989 all rights to the language were transferred to the standard bodies (ANSI and later ISO). I and others from Bell Labs actively helped non-AT&T C++ implementers to get started.
Stable:
A high degree (but not 100%) of C compatibility was considered essential from day one. A higher degree of compatibility (but still not 100%) with earlier implementations and definitions was maintained throughout. The standards process was important here (§3.1, §6).
Evolving:
New ideas have been absorbed into C++ throughout (e.g., exceptions, templates, the STL). The world evolves, and so must a living language. C++ didn't just follow fashion; occasionally, it led (e.g., generic programming and the STL). The standards process was important here (§4.1, §5, §8).

関連情報

C++の歴史と哲学 | C++アプリケーション

前へ | 次へ



 WinDbgスクリプティング講座  ホーム


Copyright©豊田孝 2004- 2008
本日は2008-12-04です。