ExampleChap1

「ExampleChap1」の編集履歴(バックアップ)一覧はこちら

ExampleChap1」(2011/02/24 (木) 08:26:23) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

#co(){ Chapter 1 Introduction Scala smoothly integrates object-oriented and functional programming. It is designed to express common programming patterns in a consise, elegant, and type-safe way. Scala introduces several innovative language constructs. For instance: - Abstract types and mixin composition unify concepts from object and module systems. - Pattern matching over class hierarchies unifies functional and object-oriented data access. It greatly simplifies the processing of XML trees. - A flexible syntax and type system enables the construction of advanced libraries and new domain specific languages. } * 第 1 章 はじめに Scala はオブジェクト指向と関数型のプログラミングをスムーズに統合します。一般的なプログラミングパターンを簡潔・エレガント・型安全に表現するようにデザインされています。Scala は革新的な構文をいくつか導入します。たとえば、 - 抽象型(abstract type)とミックスイン合成(mixin composition)は、オブジェクトとモジュール・システムの概念を統合します。 - クラス階層を超えたパターン・マッチングは、関数型とオブジェクト指向のデータ・アクセスを統合します。その結果、XML 木の処理が大幅に単純化されます。 - 柔軟な構文と型システムにより、先進的ライブラリと新しいドメイン特化言語の構築が可能です。 #co(){ At the same time, Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations. This document introduces Scala in an informal way, through a sequence of examples. Chapters 2 and 3 highlight some of the features that make Scala interesting. The following chapters introduce the language constructs of Scala in a more thorough way, starting with simple expressions and functions, and working up through objects and classes, lists and streams, mutable state, pattern matching to more complete examples that show interesting programming techniques. The present informal exposition is meant to be complemented by the Scala Language Reference Manual which specifies Scala in a more detailed and precise way. } 同時に、Scala は Java と互換性があります。Java のライブラリとフレームワークは、接着用コード(glue code)や宣言を追加せずに使用できます。 この文書は Scala を形式張らずに、多数の例を通して紹介します。 第 2 章と第 3 章では、Scala を興味深いものにしている特徴をいくつか明らかにします。続く章では、Scala の構文をより詳しく紹介します。単純な式と関数から始め、オブジェクトとクラス、リストとストリーム、ミュータブル(変更可能)な状態、パターン・マッチングと話をすすめ、興味深いプログラミング技法を示す申し分のない例へと至ります。形式張らないこの説明は、より詳細かつ正確に Scala を定義する『Scala Language Reference Manual』で補完されます。 #co(){ Acknowledgment. We owe a great debt to Abelson's and Sussman's wonderful book "Structure and Interpretation of Computer Programs"[ASS96]. Many of their examples and exercises are also present here. Of course, the working language has in each case been changed from Scheme to Scala. Furthermore, the examples make use of Scala's object-oriented constructs where appropriate. } &b(){謝辞 } 著者らは Abelson と Sussman のすばらしい本『Structure and Interpretation of Computer Programs』[ASS96] に多くを負っています。その中の例と演習問題がここにあります。もちろん、あつかう言語は Scheme、Scala というように異なっていますが。また、例では、適切と思われる場所で Scala のオブジェクト指向的な構文を用いています。 #center(){[[目次>ScalaByExample和訳]] [[次ページ>ExampleChap2]]} ---- #comment
#co(){ Chapter 1 Introduction Scala smoothly integrates object-oriented and functional programming. It is designed to express common programming patterns in a consise, elegant, and type-safe way. Scala introduces several innovative language constructs. For instance: - Abstract types and mixin composition unify concepts from object and module systems. - Pattern matching over class hierarchies unifies functional and object-oriented data access. It greatly simplifies the processing of XML trees. - A flexible syntax and type system enables the construction of advanced libraries and new domain specific languages. } #setmenu2(ex-r-menu) * 第 1 章 はじめに Scala はオブジェクト指向と関数型のプログラミングをスムーズに統合します。一般的なプログラミングパターンを簡潔・エレガント・型安全に表現するようにデザインされています。Scala は革新的な構文をいくつか導入します。たとえば、 - 抽象型(abstract type)とミックスイン合成(mixin composition)は、オブジェクトとモジュール・システムの概念を統合します。 - クラス階層を超えたパターン・マッチングは、関数型とオブジェクト指向のデータ・アクセスを統合します。その結果、XML 木の処理が大幅に単純化されます。 - 柔軟な構文と型システムにより、先進的ライブラリと新しいドメイン特化言語の構築が可能です。 #co(){ At the same time, Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations. This document introduces Scala in an informal way, through a sequence of examples. Chapters 2 and 3 highlight some of the features that make Scala interesting. The following chapters introduce the language constructs of Scala in a more thorough way, starting with simple expressions and functions, and working up through objects and classes, lists and streams, mutable state, pattern matching to more complete examples that show interesting programming techniques. The present informal exposition is meant to be complemented by the Scala Language Reference Manual which specifies Scala in a more detailed and precise way. } 同時に、Scala は Java と互換性があります。Java のライブラリとフレームワークは、接着用コード(glue code)や宣言を追加せずに使用できます。 この文書は Scala を形式張らずに、いくつもの例を通して紹介します。 第 2 章と第 3 章では、Scala を興味深いものにしている特徴をいくつか明らかにします。続く章では、Scala の構文をより詳しく紹介します。単純な式と関数から始め、オブジェクトとクラス、リストとストリーム、ミュータブル(変更可能)な状態、パターン・マッチングと話をすすめ、興味深いプログラミング技法を示す申し分のない例へと至ります。形式張らないこのドキュメントは、より詳細かつ正確に Scala を定義する『Scala Language Reference Manual』で補完されます。 #co(){ Acknowledgment. We owe a great debt to Abelson's and Sussman's wonderful book "Structure and Interpretation of Computer Programs"[ASS96]. Many of their examples and exercises are also present here. Of course, the working language has in each case been changed from Scheme to Scala. Furthermore, the examples make use of Scala's object-oriented constructs where appropriate. } &b(){謝辞 } 著者らは Abelson と Sussman のすばらしい本『Structure and Interpretation of Computer Programs』[ASS96] に多くを負っています。その中の例と演習問題がここにあります。もちろん、あつかう言語は Scheme、Scala というように異なっていますが。また、例では、適切と思われる場所で Scala のオブジェクト指向的な構文を用いています。 #center(){[[目次>ScalaByExample和訳]] [[次ページ>ExampleChap2]]} ---- #comment

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。