0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【公ド読】複雑な継承階層の簡略化

Posted at

【公式ドキュメントを読もうシリーズ】複雑な継承階層の簡略化

シリーズ概要

https://qiita.com/yasu_programming/items/cec66f9e8d5d571e9ce3

URL

https://docs.github.com/ja/copilot/copilot-chat-cookbook/refactoring-code/simplifying-complex-inheritance-hierarchies

説明

複雑な継承階層をコンポジションベースの設計にリファクタリングしてくれる。

リンクのコードを見ても、継承を多用していると、継承先を追っていくのが大変な一方で、コンポジションでの管理だとコードが読みやすくなるのかもしれないとは思っている。

所感

アーキテクチャの設計ってまだまだ知らないことばかりなので、学ぶのが面白いです。
今更ながらAIが出力したコードをそのままQiitaに載せることが著作権上大丈夫なのかよくわかっていないので結構調べたが、私のコードは

  • 他者の著作物の無断転用をしているわけでもなく
  • 一般知識の列挙であり、
  • 著作権の保護対象外である

ため大丈夫だと思っているが、100%大丈夫ということでもないので、コードの掲載はやめました。
AIが生成したコードを書くことで、理解が深まるんだろうと思ったが、権利の勉強をしないと発信することも怖いなと思いました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?