DIP61: redone to do extern(C++,N) syntax

via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 29 13:23:53 PDT 2014


On Tuesday, 29 April 2014 at 19:48:36 UTC, Walter Bright wrote:
> I'd do your example as:
>
> vec.d:
> extern(C++,veclib){ struct … vec4 …; }
>
> framework1.d:
> import vec;
> extern(C++,physics){ vec4 f(vec4 …) … }
>
> framework2.d:
> import vec;
> extern(C++,graphics){ void g(vec4 …) … }

Yes, but that requires the authors of framework1 and framework2 
to cooperate. Which is why you with this DIP will end up with 
people being better off by using pure C++ rather than mixed D/C++ 
from different sources.

With "graphics::g(physics::f(…))" this would not have been an 
issue.


More information about the Digitalmars-d mailing list