オブジェクト指向JavaScript
代わりの継承機構を検討すること
- JavaScriptではオブジェクト指向スタイルの継承をまねるたくさんの方法が存在する。しかし、継承をまねるすべての機構が似たように動くわけではない。
- 特にコードがオーバーライドされたメソッドを頻繁にコールするなら、JavaScript Inheritance Performance studyの結果を見てみるべきだ。
- There exists many ways to mimic Object Orientated style inheritance in JavaScript. However, not all the mechanism to emulate inheritance perform similarly.
- Especially if your code calls overridden methods frequently you should take a look at the results of JavaScript Inheritance Performance study.