|
5 | 5 | # Rustのオブジェクト指向プログラミング機能
|
6 | 6 |
|
7 | 7 | <!--
|
8 |
| -Object-oriented programming (OOP) is a way of modeling programs. Objects came |
9 |
| -from Simula in the 1960s. Those objects influenced Alan Kay’s programming |
10 |
| -architecture in which objects pass messages to each other. He coined the term |
11 |
| -*object-oriented programming* in 1967 to describe this architecture. Many |
12 |
| -competing definitions describe what OOP is; some definitions would classify |
13 |
| -Rust as object oriented, but other definitions would not. In this chapter, |
14 |
| -we'll explore certain characteristics that are commonly considered object |
15 |
| -oriented and how those characteristics translate to idiomatic Rust. We’ll then |
16 |
| -show you how to implement an object-oriented design pattern in Rust and discuss |
17 |
| -the trade-offs of doing so versus implementing a solution using some of Rust’s |
18 |
| -strengths instead. |
| 8 | +Object-oriented programming (OOP) is a way of modeling programs. Objects as a |
| 9 | +programmatic concept were introduced in the programming language Simula in the |
| 10 | +1960s. Those objects influenced Alan Kay’s programming architecture in which |
| 11 | +objects pass messages to each other. To describe this architecture, he coined |
| 12 | +the term *object-oriented programming* in 1967. Many competing definitions |
| 13 | +describe what OOP is, and by some of these definitions Rust is object-oriented, |
| 14 | +but by others it is not. In this chapter, we’ll explore certain characteristics |
| 15 | +that are commonly considered object-oriented and how those characteristics |
| 16 | +translate to idiomatic Rust. We’ll then show you how to implement an |
| 17 | +object-oriented design pattern in Rust and discuss the trade-offs of doing so |
| 18 | +versus implementing a solution using some of Rust’s strengths instead. |
19 | 19 | -->
|
20 | 20 |
|
21 |
| -オブジェクト指向プログラミング(OOP)は、プログラムをモデル化する手段です。オブジェクトは、 |
22 |
| -1960年代のSimulaに端緒を発しています。このオブジェクトは、 |
| 21 | +オブジェクト指向プログラミング(OOP)は、プログラムをモデル化する手段です。プログラム上の概念としてのオブジェクトは、 |
| 22 | +1960年代のプログラミング言語Simulaで導入されました。このオブジェクトは、 |
23 | 23 | お互いにメッセージを渡し合うというアラン・ケイ(Alan Kay)のプログラミングアーキテクチャに影響を及ぼしました。
|
24 |
| -彼は、このアーキテクチャを解説するために、*オブジェクト指向プログラミング*という用語を造語しました。 |
25 |
| -多くの競合する定義がOOPが何かを解説しています; Rustをオブジェクト指向と区分する定義もありますし、 |
26 |
| -しない定義もあります。この章では、広くオブジェクト指向と捉えられる特定の特徴と、 |
| 24 | +彼は、このアーキテクチャを記述するために、*オブジェクト指向プログラミング*という用語を造語しました。 |
| 25 | +多くの競合する定義がOOPが何かを記述しており、こうした定義の一部によれば、Rustはオブジェクト指向であり |
| 26 | +他の定義によれば、Rustはオブジェクト指向ではありません。この章では、広くオブジェクト指向と捉えられる特定の特徴と、 |
27 | 27 | それらの特徴がこなれたRustでどう表現されるかを探究します。それからオブジェクト指向のデザインパターンをRustで実装する方法を示し、
|
28 | 28 | そうすることとRustの強みを活用して代わりの解決策を実装する方法の代償を議論します。
|
0 commit comments