Timeline for Why is using 'final' on a class really so bad?
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 3, 2023 at 7:45 | history | protected | gnat | ||
May 2, 2023 at 20:00 | answer | added | Yonn Trimoreau | timeline score: 0 | |
Dec 7, 2022 at 18:00 | history | tweeted | twitter.com/StackSoftEng/status/1600550717034565633 | ||
Sep 24, 2019 at 7:19 | comment | added | Black | "PHP 5 introduces the final keyword, which prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended." php.net/manual/en/language.oop5.final.php It is not bad at all. | |
Nov 18, 2015 at 21:38 | answer | added | gnasher729 | timeline score: 5 | |
Nov 18, 2015 at 20:26 | history | edited | user40980 | CC BY-SA 3.0 |
Remove call for anecdotes.
|
Nov 18, 2015 at 20:07 | answer | added | Nikita U. | timeline score: 6 | |
May 21, 2014 at 19:54 | comment | added | JW01 | Nice article. It speaks my thoughts about this. I did not know about those annotations so that was handy. Cheers. | |
May 18, 2014 at 16:16 | comment | added | hakre | Some blog post about the topic: Final Classes: Open for Extension, Closed for Inheritance (May 2014; by Mathias Verraes) | |
Oct 5, 2011 at 22:00 | vote | accept | JW01 | ||
Jul 14, 2011 at 7:00 | answer | added | Konrad Rudolph | timeline score: 72 | |
Jul 7, 2011 at 4:24 | comment | added | Job | For example, MbUnit is an open framework for .Net unit testing, and MsTest ain't (surprise surprise). As the result, you HAVE to shell out 5k to MSFT just because you want to run some tests the MSFT way. Other test runners cannot run the test dll that is built with MsTest - all because of the final classes that MSFT used. | |
Jul 3, 2011 at 11:22 | vote | accept | JW01 | ||
Jul 14, 2011 at 16:15 | |||||
Jul 2, 2011 at 13:58 | comment | added | Job | If you have full control of your code, then it is not terrible, I suppose, but a bit on a OCD side. What if you miss a class (e.g it has no children but it aint final)? It is better let a tool scan the code and tell you whether some class has children. As soon as you package this as a library and give it to someone else, dealing with 'final' becomes a pain. | |
Jul 2, 2011 at 13:49 | answer | added | Jonny Dee | timeline score: 2 | |
Jul 2, 2011 at 13:06 | answer | added | Jeremy | timeline score: 9 | |
Jul 2, 2011 at 12:39 | history | edited | JW01 | CC BY-SA 3.0 |
edited title
|
Jul 2, 2011 at 12:15 | history | edited | JW01 | CC BY-SA 3.0 |
added 2 characters in body
|
Jul 2, 2011 at 12:12 | answer | added | user1249 | timeline score: 0 | |
Jul 2, 2011 at 12:10 | history | asked | JW01 | CC BY-SA 3.0 |