3 ms·
I think you're talking past each other. In both cases you need discipline to correctly interact with shared data. The point is: some languages enforce discipl
by jacques_chester 11y ago
I think you're talking past each other.
In both cases you need discipline to correctly interact with shared data.
The point is: some languages enforce discipline with compilers. Some rely on engineers to enforce it themselves.
Of the two, compilers appear so far to be more consistent.
- robotresearcher 11y ago> compilers appear so far to be more consistent. That's true. Which is why object membership is private by default in C++. You can't get the address of an object member unless the author expressly allows you. That's why I think the GP's complaints about pointers making safe shared data nigh-impossible in C++ was maybe overstated. The language/compiler has things to help you. Much more than C, anyway.