On 12/05/2010 21:00, Don wrote:
BLS wrote:
Hi,
I think nearly nobody is using extern (C++) 'cause of it's limits. So
why not drop it ? IMHO this feature is not a " D2 sales argument",
instead it's vs. productive.
What do you think ?
Bjoern


There's a much more fundamental problem with it: C++ doesn't support it!
You can't compile a file with MSVC and link it to something compiled
with g++.
Look up my CodeProject article on member function pointers -- every
vendor has their own API, and virtually none of them are documented.

On Windows, extern(C++) means extern(DMC++), but for me, the only thing
I'd want to link to is MSVC. Much more useful would be, as Brad says, to
provide a way of specifying the name mangling. If we could do that, we'd
be more compatible with C++ than C++ is to itself.


Given that we have extern (whatever C++) still only virtual methods are available from D. So I doubt that this feature is worth the effort.
I see indeed that we have a need for extern (COM).
---
..Detecting extern(C++) implicates that you can use a C++ class out of the box. A new D user gives it a try and after a while he is pretty unsatisfied. This is what I have meant with "not a D Sales argument"

Reply via email to