On Tuesday, 22 September 2015 at 14:46:24 UTC, Kagamin wrote:
I believe I've seen const declarations in C incorrectly declared as head const when transitive const was really wanted, but it wasn't done because transitive const in C is so much PITA. So the only real concern here is mangling.

That's a rather orthodox viewpoint... If D const is to have any value then the optimizer should be allowed to cache computations and elide memory barriers.

The consequences of a C function mutating something reachable through const is either a disaster or the D compiler will have to forget about those kind of optimizations after calling a C function. But then const has very little value...

Reply via email to