27 ms·
Is @Stable a generalization of the final keyword or is there more to it that I'm missing?
by Bootvis 1y ago
Is @Stable a generalization of the final keyword or is there more to it that I'm missing?
- selkin 1y agoFinal is an access modifier. It controls who can change a value (in this case, no one). And like other access modifiers, you can use reflection to remove or change those modifier. It is a security barrier the developer asks the system to uphold. The Stable annotation is an optimization mechanism: a promise the developer makes to the compiler. It is on the developer to uphold.