Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cf. #2773 (comment) > respond to `foobar`のような部分は、「foobar **メソッド**を持つオブジェクト」「オブジェクトに foobar メソッドを定義する」と直接的に表現するのはどうだろうか(そして注釈を削除し、respond toの香りを無くす) > * respond toをあまり大事にする必要がないと思うため: > > * トレイトやインターフェイスのないRubyでは、ダックタイピング的に実装することになるが、そこまでくると、直接的に「メソッドを持つ」でいいと感じる > * ココをうまく使いこなすのに、内部の挙動である`Object#respond_to?`まで踏み込んで理解する必要性は薄く(個人的見解)、却って(初心者寄りの読者は特に)混乱を招きそう
- Loading branch information