3 ms·
> This just isn’t true. There are compatible changes and incompatible changes you can make. This statement exactly applies to the case you mentioned: Superclas
by rcme 4y ago
> This just isn’t true. There are compatible changes and incompatible changes you can make.
This statement exactly applies to the case you mentioned: Superclass implementations can change later (you can recompile the superclass without having to recompile the subclass), you can’t assume their current implementation will stay the same.
- layer8 4y agoFor me these are on two different levels. The guarantees about final fields being assigned exactly once, and the related thread-safety guarantees, are part of the soundness of the language. Late binding may fail and you'll get a NoSuchMethodError or similar, that's fine. But you won't get an Error thrown if suddenly your fields fail to initialize or your class stops being thread-safe just because the superclass implementation changed.