これはすこし一般化しすぎ

  • でもこの考え方はしばしば有用

Pythonにメタクラスの概念が導入された時の議論

  • 言語に新しい概念Xが導入された場合に「Xは必要ない」と考える人がいる
  • 新しい概念は誰かが必要なために導入されたのだが、それは「全ての人に必要」を意味しない
  • 本当に必要な人はそれを待ち望んでおり、新機能の追加をみて「これが欲しかったんだ」と感じる
  • だから必要を確信しない人にとってそれは必要ではない
  • “Metaclasses are deeper magic than 99% of users should ever worry about. If you wonder whether you need them, you don’t (the people who actually need them know with certainty that they need them, and don’t need an explanation about why).”

関連