Re: Interfacing D to existing C++ code

2015-02-02 Thread deadalnix via Digitalmars-d-announce
On Sunday, 1 February 2015 at 22:32:37 UTC, Sativa wrote: On Friday, 23 January 2015 at 11:04:12 UTC, Walter Bright wrote: Mandatory reddit link: http://www.reddit.com/r/programming/comments/2tdy5z/interfacing_d_to_legacy_c_code_by_walter_bright/ There's been a lot of interest in this

Re: Interfacing D to existing C++ code

2015-02-01 Thread Sativa via Digitalmars-d-announce
On Friday, 23 January 2015 at 11:04:12 UTC, Walter Bright wrote: Mandatory reddit link: http://www.reddit.com/r/programming/comments/2tdy5z/interfacing_d_to_legacy_c_code_by_walter_bright/ There's been a lot of interest in this topic. Interesting... I wonder if two things could happen:

Re: Interfacing D to existing C++ code

2015-02-01 Thread Ben Boeckel via Digitalmars-d-announce
On Sun, Feb 01, 2015 at 22:32:36 +, Sativa via Digitalmars-d-announce wrote: What I mean is, Do we really need to know the default arguments or are we just having to explicitly use them to make the name mangling work? If it is the latter, then surely couldn't the D compiler sort of

Re: Interfacing D to existing C++ code

2015-01-30 Thread Guillaume Chatelet via Digitalmars-d-announce
Thx for the feedback ! bug : https://issues.dlang.org/show_bug.cgi?id=14086 I worked around the name mangling issue with pragmas for now, a new version is available here : https://github.com/gchatelet/dlang_cpp_std/blob/5d52957372f7055b95d4f62ee6d9633bd620a61d/cpp_std.d

Re: Interfacing D to existing C++ code

2015-01-30 Thread Paolo Invernizzi via Digitalmars-d-announce
On Friday, 30 January 2015 at 04:08:56 UTC, Daniel Murphy wrote: Walter Bright wrote in message news:maed4o$2da6$1...@digitalmars.com... So constructors and destructors are mangled 'a la D' instead of the C++ way. Please post this to bugzilla. The problems with constructors go beyond

Re: Interfacing D to existing C++ code

2015-01-29 Thread Guillaume Chatelet via Digitalmars-d-announce
Walter how far did you get to integrate with the STL ? I started writing std::vector and std::string (linux gcc libstdc++) but maybe someone already made progress on this. It's harder than I thought and will probably require a lot of work to maintain all implementations.

Re: Interfacing D to existing C++ code

2015-01-29 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 1/29/15 4:30 AM, Guillaume Chatelet wrote: Walter how far did you get to integrate with the STL ? I started writing std::vector and std::string (linux gcc libstdc++) but maybe someone already made progress on this. It's harder than I thought and will probably require a lot of work to

Re: Interfacing D to existing C++ code

2015-01-29 Thread Guillaume Chatelet via Digitalmars-d-announce
I pushed some code for string here (nothing fancy yet) https://github.com/gchatelet/dlang_cpp_std/blob/master/cpp_std.d The linker complains about missing std::basic_stringchar, std::char_traitschar, std::allocatorchar ::__ctor() where it should be std::basic_stringchar, std::char_traitschar,

Re: Interfacing D to existing C++ code

2015-01-29 Thread Walter Bright via Digitalmars-d-announce
On 1/29/2015 1:58 PM, Guillaume Chatelet wrote: I pushed some code for string here (nothing fancy yet) https://github.com/gchatelet/dlang_cpp_std/blob/master/cpp_std.d The linker complains about missing std::basic_stringchar, std::char_traitschar, std::allocatorchar ::__ctor() where it should

Re: Interfacing D to existing C++ code

2015-01-29 Thread Daniel Murphy via Digitalmars-d-announce
Walter Bright wrote in message news:maed4o$2da6$1...@digitalmars.com... So constructors and destructors are mangled 'a la D' instead of the C++ way. Please post this to bugzilla. The problems with constructors go beyond mangling, so the current forced D mangling is intentional to

Re: Interfacing D to existing C++ code

2015-01-25 Thread Andrew Godfrey via Digitalmars-d-announce
Is it common for a C++ library you want to interface to, to use std library types in its interface? Things like iterators or maybe containers. Do those hit any of the hard cases, so that you'd need to change the std library to resolve the issue?

Re: Interfacing D to existing C++ code

2015-01-23 Thread FrankLike via Digitalmars-d-announce
On Friday, 23 January 2015 at 11:04:12 UTC, Walter Bright wrote: Mandatory reddit link: http://www.reddit.com/r/programming/comments/2tdy5z/interfacing_d_to_legacy_c_code_by_walter_bright/ There's been a lot of interest in this topic. Great!

Interfacing D to existing C++ code

2015-01-23 Thread Walter Bright via Digitalmars-d-announce
Mandatory reddit link: http://www.reddit.com/r/programming/comments/2tdy5z/interfacing_d_to_legacy_c_code_by_walter_bright/ There's been a lot of interest in this topic.