「Chapter 11 Mutable State」の編集履歴(バックアップ)一覧はこちら
追加された行は緑色になります。
削除された行は赤色になります。
#co(){
Chapter 11 Mutable State
Most programs we have presented so far did not have side-effects(*1) . Therefore, the notion of time did not matter. For a program that terminates, any sequence of actions would have led to the same result! This is also reflected by the substitution model of computation, where a rewrite step can be applied anywhere in a term, and all rewritings that terminate lead to the same solution. In fact, this confluence property is a deep result in λ-calculus, the theory underlying functional programming.
}
* 第 11 章 ミュータブルな状態 (Mutable State)
これまで示してきたほとんどのプログラムには副作用(*1)はありませんでした。したがって、&bold(){時間}の記述は問題になりませんでした。終了するプログラムでは、アクションの列は同じ結果をもたらします。これは計算の置き換えモデルにも反映されており、書き換えステップは項のどこにでも適用可能で、終了する様な書き換えは同じ答えをもたらします。実際、この&bold(){合流性}はλ計算、関数型プログラミングの基礎をなす理論の深遠な結論です。
#co(){
In this chapter, we introduce functions with side effects and study their behavior. We will see that as a consequence we have to fundamentally modify up the substitution model of computation which we employed so far.
}
この章では副作用を持つ関数を導入し、その振る舞いを調べます。その結果、これまで用いてきた計算の置き換えモデルを根本から修正する必要に迫られるでしょう。
- [[11.1 状態を持つオブジェクト (Stateful Object) >Example11.1]]
- [[11.2 命令型制御構造 (Imperative Control Structures) >Example11.2]]
- [[11.3 高度な例 : 離散イベントシミュレーション >Example11.3]]
- [[11.4 まとめ >Example11.4]]
#co(){
(*1) We ignore here the fact that some of our program printed to standard output, which technically is a side effect.
}
(*1) プログラムの中には標準出力に出力するものもあり、厳密にはそれは副作用である、ということをここでは無視します。
#center(){[[前ページ>Example10.5]] [[ 11 章>Chapter 11 Mutable State]] [[目次>ScalaByExample和訳]] [[次ページ>Example11.1]]}
----
#comment
#co(){
Chapter 11 Mutable State
Most programs we have presented so far did not have side-effects(*1) . Therefore, the notion of time did not matter. For a program that terminates, any sequence of actions would have led to the same result! This is also reflected by the substitution model of computation, where a rewrite step can be applied anywhere in a term, and all rewritings that terminate lead to the same solution. In fact, this confluence property is a deep result in λ-calculus, the theory underlying functional programming.
}
#setmenu2(ex-r-menu)
* 第 11 章 ミュータブルな状態 (Mutable State)
これまで示してきたほとんどのプログラムには副作用(*1)はありませんでした。したがって、&bold(){時間}の記述は問題になりませんでした。終了するプログラムでは、アクションの列は同じ結果をもたらします。これは計算の置き換えモデルにも反映されており、書き換えステップは項のどこにでも適用可能で、終了する様な書き換えは同じ答えをもたらします。実際、この&bold(){合流性}はλ計算、関数型プログラミングの基礎をなす理論の深遠な結論です。
#co(){
In this chapter, we introduce functions with side effects and study their behavior. We will see that as a consequence we have to fundamentally modify up the substitution model of computation which we employed so far.
}
この章では副作用を持つ関数を導入し、その振る舞いを調べます。その結果、これまで用いてきた計算の置き換えモデルを根本から修正する必要に迫られるでしょう。
- [[11.1 状態を持つオブジェクト (Stateful Object) >Example11.1]]
- [[11.2 命令型制御構造 (Imperative Control Structures) >Example11.2]]
- [[11.3 高度な例 : 離散イベントシミュレーション >Example11.3]]
- [[11.4 まとめ >Example11.4]]
#co(){
(*1) We ignore here the fact that some of our program printed to standard output, which technically is a side effect.
}
(*1) プログラムの中には標準出力に出力するものもあり、厳密にはそれは副作用である、ということをここでは無視します。
#center(){[[前ページ>Example10.5]] [[ 11 章>Chapter 11 Mutable State]] [[目次>ScalaByExample和訳]] [[次ページ>Example11.1]]}
----
#comment