cpp_binder, a not-yet-useful tool for generating C++ bindings

Ola Fosheim Grøstad via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Sep 22 07:53:52 PDT 2015


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...



More information about the Digitalmars-d-announce mailing list