Timeline for Object oriented immutability: final classes or final methods
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 11, 2018 at 14:24 | comment | added | gnat |
I can't make sense of this question sorry. I'm talking about uncertainty when there's a mix of final and non-final methods within the class. Final modifier at class level is a whole different game, it is either present or absent: there's no ambiguity (side note with Java 10 repetitive example no longer holds, it's private var foo = new RepeatMe(); )
|
|
Apr 11, 2018 at 14:18 | comment | added | user949300 |
As for "saving the need to repeat final" a skillion times, sorry, repetition in Java, for better or worse, is a feature. How many skillions of times must you write private RepeatMe foo = new RepeatMe(); ?
|
|
Apr 11, 2018 at 14:12 | comment | added | user949300 |
How do we know they didn't "accidently" declare the class final ?
|
|
Apr 12, 2017 at 7:31 | history | edited | CommunityBot |
replaced http://programmers.stackexchange.com/ with https://softwareengineering.stackexchange.com/
|
|
Oct 15, 2013 at 17:26 | history | edited | gnat | CC BY-SA 3.0 |
wordsmithing
|
Oct 15, 2013 at 12:50 | history | edited | gnat | CC BY-SA 3.0 |
minor wordsmithing
|
Oct 15, 2013 at 12:33 | comment | added | nablex | While what you say is true, the same can be said of a lot of language constructs. Developer errors will always occur, adding a shortcut to avoid having to think about a problem is how dynamic typing was invented :) | |
Oct 15, 2013 at 12:28 | history | edited | gnat | CC BY-SA 3.0 |
added 74 characters in body
|
Oct 15, 2013 at 12:23 | history | answered | gnat | CC BY-SA 3.0 |