4 ms·
What operator is used to modify the value doesn't matter, just the fact that you can do so. At the point where you use an assignable lvalue, the optimizer needs
by kmeisthax 4y ago
What operator is used to modify the value doesn't matter, just the fact that you can do so. At the point where you use an assignable lvalue, the optimizer needs to know where that lvalue came from, which means that pointers need to be tracked like references.
My point is that because pointers act like both values and references, they are neither values nor references. This makes it impossible to soundly reason about them.
- ralfj 4y agoIt is certainly possible to soundly reason about them. The C standard just does not describe how to do it. There is plenty of PL work (in particular everything considering ML with imperative features, many decades worth of work) where references are values, that works perfectly fine.
- int_19h 4y agoI still don't see why it's contradictory. They can be both values and references just fine.