2 ms·
You’re missing the issue being resolved. This does not impact anything in code that has no errors, because that’s not the point. The goal of annotations like t
by olliej 2y ago
You’re missing the issue being resolved. This does not impact anything in code that has no errors, because that’s not the point.
The goal of annotations like this is to 1: make it harder to make the mistakes in the first place (by making it possible for the compiler to detect failures to update, etc) and 2: make it possible for the compiler to actually prevent errors even at runtime.
Again the issue is not what happens when everything is perfect, it’s what happens when everything is not.
[edit: I don’t even think you can reasonably call this syntactic sugar as it does not do any of the actual work of updating things for you, it’s literally just telling the compiler what the semantics of the object is, you still have to do everything yourself with the only exception being guaranteed bounds checks which looks to be a compiler mode dependent behavior]