回答編集履歴
5
update
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
「C.139: Use `final` on classes sparingly」は字義通り「控え目に(sparingly)利用せよ」と言っているだけですから、クラス設計において意味論上の妥当な理由があると考えるなら`final`修飾すればよいと思います。
|
2
2
|
|
3
|
-
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) しています。当時はクラス/関数の両方を対象としていたようですが、後に [#576: C.139 is harmful](https://github.com/isocpp/CppCoreGuidelines/issues/576) を受けて
|
3
|
+
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) しています。当時はクラス/関数の両方を対象としていたようですが、後に [#576: C.139 is harmful](https://github.com/isocpp/CppCoreGuidelines/issues/576) などを受けて [Noteの追記](https://github.com/isocpp/CppCoreGuidelines/commit/e0de4df83b19ccac128ebf7e74edce3997ecf13f) や [クラスだけに対象を絞って](https://github.com/isocpp/CppCoreGuidelines/commit/17ccab5836bfc3b8cdecd1bff3c4fae1a446271c) います。
|
4
4
|
> Reason
|
5
5
|
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|
6
6
|
|
4
add link
answer
CHANGED
@@ -2,4 +2,7 @@
|
|
2
2
|
|
3
3
|
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) しています。当時はクラス/関数の両方を対象としていたようですが、後に [#576: C.139 is harmful](https://github.com/isocpp/CppCoreGuidelines/issues/576) を受けて項目C.139は[クラスだけに対象を絞って注記も追加](https://github.com/isocpp/CppCoreGuidelines/commit/17ccab5836bfc3b8cdecd1bff3c4fae1a446271c) しています。
|
4
4
|
> Reason
|
5
|
-
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|
5
|
+
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|
6
|
+
|
7
|
+
関連する技術記事として、下記のような主張もあります:
|
8
|
+
- [The Performance Benefits of Final Classes](https://devblogs.microsoft.com/cppblog/the-performance-benefits-of-final-classes/)
|
3
refinement
answer
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
「C.139: Use `final` on classes sparingly」は字義通り「控え目に(sparingly)利用せよ」と言っているだけですから、クラス設計において意味論上の妥当な理由があると考えるなら`final`修飾すればよいと思います。
|
2
2
|
|
3
|
-
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加
|
3
|
+
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) しています。当時はクラス/関数の両方を対象としていたようですが、後に [#576: C.139 is harmful](https://github.com/isocpp/CppCoreGuidelines/issues/576) を受けて項目C.139は[クラスだけに対象を絞って注記も追加](https://github.com/isocpp/CppCoreGuidelines/commit/17ccab5836bfc3b8cdecd1bff3c4fae1a446271c) しています。
|
4
4
|
> Reason
|
5
5
|
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|
2
update
answer
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
「C.139: Use `final` on classes sparingly」は字義通り「控え目に(sparingly)利用せよ」と言っているだけですから、クラス設計において意味論上の妥当な理由があると考えるなら`final`修飾すればよいと思います。
|
2
2
|
|
3
|
-
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加した](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) ようです。当時はクラス/関数の両方を対象としていたようですが、後に C.139 は[クラスだけに対象が絞
|
3
|
+
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加した](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) ようです。当時はクラス/関数の両方を対象としていたようですが、後に [#576: C.139 is harmful](https://github.com/isocpp/CppCoreGuidelines/issues/576) を受けて項目C.139は[クラスだけに対象が絞って注記追加した](https://github.com/isocpp/CppCoreGuidelines/commit/17ccab5836bfc3b8cdecd1bff3c4fae1a446271c) ようです。
|
4
4
|
> Reason
|
5
5
|
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|
1
update
answer
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
「C.139: Use `final` on classes sparingly」は字義通り「控え目に(sparingly)利用せよ」と言っているだけですから、クラス設計において意味論上の妥当な理由があると考えるなら`final`修飾すればよいと思います。
|
2
2
|
|
3
|
-
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加した](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) ようです。当時はクラス/関数の両方を対象としていたようですが、後に C.139 はクラスだけに対象が絞られたようです。
|
3
|
+
[#170: C153. Use final only sparingly ](https://github.com/isocpp/CppCoreGuidelines/issues/170)を受けて、Bjarne Stroustrup氏が [C.139: Use `final` sparinglyを追加した](https://github.com/isocpp/CppCoreGuidelines/commit/1b79ede5c56be8371d7a66e02025d3e248271efb#diff-10589f52a46524ed019833fb39740530034f84871ad0c5e547f56e3f7b465c7aR5504) ようです。当時はクラス/関数の両方を対象としていたようですが、後に C.139 は[クラスだけに対象が絞られた](https://github.com/isocpp/CppCoreGuidelines/commit/17ccab5836bfc3b8cdecd1bff3c4fae1a446271c) ようです。
|
4
4
|
> Reason
|
5
5
|
> Capping a hierarchy with `final` is rarely needed for logical reasons and can be damaging to the extensibility of a hierarchy.
|