extern(C) with function returning user type

bachmeier via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 31 09:09:22 PDT 2015


On Friday, 31 July 2015 at 03:30:20 UTC, Kyoji Klyden wrote:
> So idk, it feels silly and counterproductive to have D not able 
> to natively use C libraries. Are we just gonna have to write D 
> bindings to every notable library out there? Also I don't see 
> how it'd be problematic, if you don't want a C preprocessor 
> kicking in, then just don't import any C source, and then the 
> compiler will just skip that step.  :P

That's how you end up with C++. The solution there is to use only 
a subset of the language, but since everyone has her own subset, 
you can either learn the whole language or not interact with 
anyone else's code. A tool-based solution is much better.


More information about the Digitalmars-d-learn mailing list