デザインパターンに出てくる用語集を考えます。m から pまで

デザインパターンを調べ始めた経緯はこちらです。

他のパターンはこちらです。

今回はオブジェクト指向のための再利用可能なデザインパターンを読み解くために必要な用語集を作成します。

主にこちらのサイトの用語を翻訳していきます。

説明に必要な単語であればこのサイトに載っていなくても並べることがあります。

※かなり紆余曲折することや誤った解釈をする可能性があります。その際はコメントをお待ちしています。よろしくお願いします。

※アルファベット順で並べていますが今後のアップデートであいうえお順に整理しなおす予定です。

Glossary 用語

M

meta class メタクラス

Classes are objects in Smalltalk. A metaclass is the class of a class object. 

クラスはSmalltalkのオブジェクトです。メタクラスは、クラスオブジェクトのクラスです。

画像1

Smalltalkの世界では、Objectという存在が、すべての世界の根元になっているとしています。「最初にObjectありき」です。
この「もの」が発展して、振る舞いを持つように拡張された「もの」がBehavior(「振舞いをもつもの」)です。さらに、属性の値が持てるように拡張したものが、ClassDescription(「クラスのようなもの」)なのです。

https://www.ogis-ri.co.jp/otc/hiroba/technical/Squeak4/S4-5-4_1.html

A behavior is an object responsible for implementing a specific role, e.g.

https://www.objc.io/issues/13-architecture/behaviors/

ビヘイビアとは、特定の役割を実装する責任を負うオブジェクトのこと。と訳せます。

「Classのようなもの」は実はSmalltalkでは2種類あります。Class(「インスタンスを分類するもの」)と、Metaclass(「クラスを分類するもの」)です。

https://www.ogis-ri.co.jp/otc/hiroba/technical/Squeak4/S4-5-4_1.html


mixin class ミックスインクラス

A class designed to be combined with other classes through inheritance. Mixin classes are usually abstract. 

継承によって他のクラスと組み合わせられるように設計されたクラス。ミックスインクラスは通常、抽象クラスです。

In object-oriented programming languages, a mixin (or mix-in)[1][2][3][4] is a class that contains methods for use by other classes without having to be the parent class of those other classes. How those other classes gain access to the mixin's methods depends on the language. Mixins are sometimes described as being "included" rather than "inherited".

Mixins encourage code reuse and can be used to avoid the inheritance ambiguity that multiple inheritance can cause[5] (the "diamond problem"), or to work around lack of support for multiple inheritance in a language. A mixin can also be viewed as an interface with implemented methods. This pattern is an example of enforcing the dependency inversion principle.

https://en.wikipedia.org/wiki/Mixin

オブジェクト指向のプログラミング言語において、ミックスイン(mixin)とは、他のクラスの親クラスでなくても、他のクラスが使用できるメソッドを含むクラスのことである。他のクラスがどのようにしてミックスインのメソッドにアクセスするかは、言語によって異なります。Mixinsは「継承」ではなく「包含」されると表現されることもあります。

Mixinsはコードの再利用を促進し、多重継承が引き起こす継承の曖昧さ(「ダイヤモンド問題」)を回避したり、多重継承がサポートされていない言語を回避するために使用することができます。Mixinsは、実装されたメソッドを持つインターフェイスと見ることもできる。このパターンは、依存関係逆転の原則を適用した例です。

O

object オブジェクト

A run-time entity that packages both data and the procedures that operate on that data. 

データと、そのデータを操作するプロシージャの両方をパッケージ化したランタイムエンティティです。


object composition オブジェクト合成

Assembling or composing objects to get more complex behavior. 

より複雑な動作を得るために、オブジェクトを組み立てたり、合成したりすること。


object diagram オブジェクト図

A diagram that depicts a particular object structure at run-time. 

実行時に特定のオブジェクト構造を描写する図。

参考:「Object diagram」From Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Object_diagram


object reference オブジェクト参照

A value that identifies another object. 

他のオブジェクトを識別するための値。


operation 操作

An object's data can be manipulated only by its operations. An object performs an operation when it receives a request. In C++, operations are called member functions. Smalltalk uses the term method. 

オブジェクトのデータは、そのオペレーションによってのみ操作することができます。オブジェクトは、要求を受け取ると操作を実行します。C++では、オペレーションはメンバー関数と呼ばれます。Smalltalkではメソッドと呼ばれます。


overriding オーバーライド

Redefining an operation (inherited from a parent class) in a subclass. 

親クラスから継承された操作をサブクラスで再定義すること。


P

parameterized type パラメタライズドタイプ

A type that leaves some constituent types unspecified. The unspecified types are supplied as parameters at the point of use. In C++, parameterized types are called templates. 

いくつかの構成要素の型を指定しないままにしておく型。指定されていない型は、使用時にパラメーターとして提供されます。C++では、パラメータ化された型をテンプレートと呼びます。

Generic programmingと関係しています。

参考:「Generic programming」From Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Generic_programming


parent class 親クラス

The class from which another class inherits. Synonyms are superclass (Smalltalk), base class (C++), and ancestor class. 

他のクラスが継承するクラス。同義語として、スーパークラス(Smalltalk)、ベースクラス(C++)、祖先クラスがあります。


polymorphism ポリモーフィズムもしくは多相性

The ability to substitute objects of matching interface for one another at run-time. 

一致するインターフェースのオブジェクトを、実行時に互いに置き換えられること。


private inheritance プライベート継承

In C++, a class inherited solely for its implementation. 

C++では、その実装のためだけに継承されるクラス。


protocol プロトコル

Extends the concept of an interface to include the allowable sequences of requests. 

インターフェイスの概念を拡張し、リクエストの許容されるシーケンスを含む。


request リクエスト

An object performs an operation when it receives a corresponding request from another object. A common synonym for request is message.

オブジェクトは、他のオブジェクトから対応するリクエストを受け取ると操作を実行する。リクエストの一般的な同義語はメッセージです。


今回はmからpまでです。ところどころに出てくるリクエストは先に翻訳しました。

翻訳にはhttps://www.deepl.com/を用いています。

ここまでお読みいただきありがとうございます。

この記事が気に入ったらサポートをしてみませんか?