Re: on interfacing w/C++

2014-04-16 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 15 April 2014 at 11:04:42 UTC, Daniel Murphy wrote: Manu via Digitalmars-d digitalmars-d@puremagic.com wrote in message news:mailman.9.1397553786.2763.digitalmar...@puremagic.com... Huh? Do methods work now? Since when? Since I needed them for DDMD. Is this[1] then out of

Re: on interfacing w/C++

2014-04-16 Thread Daniel Murphy via Digitalmars-d
Moritz Maxeiner wrote in message news:kvzwlecwougswrqka...@forum.dlang.org... Is this[1] then out of date and I can interface with non-virtual methods? Because that's what your post seems to imply (unless I misunderstood). [1] http://dlang.org/cpp_interface.html Yes. The best place to

Re: on interfacing w/C++

2014-04-16 Thread Moritz Maxeiner via Digitalmars-d
On Wednesday, 16 April 2014 at 14:00:24 UTC, Daniel Murphy wrote: Moritz Maxeiner wrote in message news:kvzwlecwougswrqka...@forum.dlang.org... Is this[1] then out of date and I can interface with non-virtual methods? Because that's what your post seems to imply (unless I misunderstood).

Re: on interfacing w/C++

2014-04-16 Thread monnoroch via Digitalmars-d
What about namespaces?

Re: on interfacing w/C++

2014-04-16 Thread Daniel Murphy via Digitalmars-d
Moritz Maxeiner wrote in message news:nadswyordzxwa...@forum.dlang.org... That sounds very cool, I've had a look at [1] and [2], which seem to be the two files with the new C++ class interfacing. As far as I could tell, you need to create any instances of C++ classes with C++ code / you

Re: on interfacing w/C++

2014-04-16 Thread Daniel Murphy via Digitalmars-d
monnoroch wrote in message news:kqjrnqecnfejmiwnk...@forum.dlang.org... What about namespaces? Zero support currently.

Re: on interfacing w/C++

2014-04-16 Thread John Colvin via Digitalmars-d
On Wednesday, 16 April 2014 at 17:16:07 UTC, Daniel Murphy wrote: If you are using 'new' in C++ it will not use D's GC heap, unless you overrode the global 'new' operator or something. Which, if you did, would enable you to use C++ classes from D somewhat transparently, no?

Re: on interfacing w/C++

2014-04-16 Thread Daniel Murphy via Digitalmars-d
John Colvin wrote in message news:qbwxwxekffpegmbck...@forum.dlang.org... Which, if you did, would enable you to use C++ classes from D somewhat transparently, no? Potentially, yes. You'd need to be very careful that there was always a gc-visible reference to the class to keep it alive, so

Re: on interfacing w/C++

2014-04-15 Thread Manu via Digitalmars-d
Huh? Do methods work now? Since when? We still have no member function pointers either. On 15 April 2014 14:25, Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: Jacob Carlborg wrote in message news:lig73r$nvn$1...@digitalmars.com... You do know D supports extern(C++)?

Re: on interfacing w/C++

2014-04-15 Thread Daniel Murphy via Digitalmars-d
Manu via Digitalmars-d digitalmars-d@puremagic.com wrote in message news:mailman.9.1397553786.2763.digitalmar...@puremagic.com... Huh? Do methods work now? Since when? Since I needed them for DDMD. We still have no member function pointers either. Meh.

Re: on interfacing w/C++

2014-04-15 Thread Andrei Alexandrescu via Digitalmars-d
On 4/15/14, 2:22 AM, Manu via Digitalmars-d wrote: We still have no member function pointers either. I'd advocate against supporting C++ member function pointers. -- Andrei

Re: on interfacing w/C++

2014-04-14 Thread Jacob Carlborg
On 14/04/14 00:54, Ellery Newcomer wrote: (Putting this out there because it sounds like I'm going to get scooped in the near future) So last week I was dinking around with the idea of a library to support calling C++ functions. So I wrote some ct code to emulate g++ 4.8.2's mangling scheme,

Re: on interfacing w/C++

2014-04-14 Thread Daniel Murphy via Digitalmars-d
Jacob Carlborg wrote in message news:lig73r$nvn$1...@digitalmars.com... You do know D supports extern(C++)? Although I don't know to which extent. Pretty much everything works except special functions (ctors/dtors/operators).

on interfacing w/C++

2014-04-13 Thread Ellery Newcomer
(Putting this out there because it sounds like I'm going to get scooped in the near future) So last week I was dinking around with the idea of a library to support calling C++ functions. So I wrote some ct code to emulate g++ 4.8.2's mangling scheme, and wrote a bit more code to wrap it, and