Pointer to private structure

Ali via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Dec 19 02:14:49 PST 2016


On Monday, 19 December 2016 at 06:42:27 UTC, Nikhil Jacob wrote:
> On Monday, 19 December 2016 at 06:21:10 UTC, ketmar wrote:
>> i bet that just trying this with D compiler will take less 
>> time than writing forum post.
>
> I did try but it seems to give compilation failure... Let me 
> try once more and I will get back with more details.

What're you trying to do here?

Forward declarations in C++ are used to solve a few different 
things:
1. Reduce build times (unneeded in D AFAIK)
2. Break cyclic references (unneeded in D again?)
3. Give APIs visibility (D's modules and Access layers solve this)
4. Maintain binary compatibility while allowing internal data 
changes (aka pimlp idiom) <-- This I believe you cannot do in D - 
https://wiki.dlang.org/Access_specifiers_and_visibility (someone 
correct me if I'm wrong)

I've seen something about .di files in D. But they seem flakey a 
bit.



More information about the Digitalmars-d-learn mailing list