DIP61: redone to do extern(C++,N) syntax
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 29 14:05:24 PDT 2014
On Tuesday, 29 April 2014 at 20:33:07 UTC, Walter Bright wrote:
> Not really. It is reasonable to expect that when Framework1 and
> Framework2 each import 4th party Vec, that they do it with an
> import rather than inlining Vec's declarations.
Vectors are not the best example since one library might use
struct{float x,y,z,w;} and another use float[4], but that would
be too complicated to unify on the D side without a wrapper. At
least as far as I can tell.
(I.e. the C++ frameworks interoperate because the memory layout
and semantics are the same, although the types are not.)
>> With "graphics::g(physics::f(…))" this would not have been an
>> issue.
>
> Having an alternative lookup method is a large increase in
> language complexity.
I wouldn't mind using fully qualified names, but others probably
would.
>It does occur to me that two C++ symbols in the same namespace
>may be regarded as the same by the lookup code. That may be a
>reasonable enhancement request.
Yes, that would help.
More information about the Digitalmars-d
mailing list