April 27, 2014 DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
http://wiki.dlang.org/DIP61 |
April 27, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote:
> http://wiki.dlang.org/DIP61
Sounds awesome.
|
April 27, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote:
> http://wiki.dlang.org/DIP61
Without aliasing and with a unified scope operator you will get name clashes between D and C++. You should address why this is not an issue (e.g. practical and not tedious).
|
April 27, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On 4/27/2014 1:44 PM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang@gmail.com>" wrote: > On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote: >> http://wiki.dlang.org/DIP61 > > Without aliasing and with a unified scope operator you will get name clashes > between D and C++. You should address why this is not an issue (e.g. practical > and not tedious). Example of what you mean, please. |
April 27, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright Attachments:
| On Sun, Apr 27, 2014 at 2:54 PM, Walter Bright via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> http://wiki.dlang.org/DIP61
>
What happens if you try to interface with two different C++ libraries that use the same exact namespaces?
|
April 27, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Caligo | On 4/27/2014 3:07 PM, Caligo via Digitalmars-d wrote:
> On Sun, Apr 27, 2014 at 2:54 PM, Walter Bright via Digitalmars-d
> <digitalmars-d@puremagic.com <mailto:digitalmars-d@puremagic.com>> wrote:
>
> http://wiki.dlang.org/DIP61
>
>
> What happens if you try to interface with two different C++ libraries that use
> the same exact namespaces?
If any of the names mangle to the same string, you'll get errors from the linker, just as you would if referencing those libraries from C++.
|
April 28, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote:
> http://wiki.dlang.org/DIP61
This is the new grammar?
LinkageAttribute:
'extern' '(' identifier '++'? (',' identifier)? ')'
|
April 28, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian Schott | On 4/27/2014 5:58 PM, Brian Schott wrote:
> On Sunday, 27 April 2014 at 19:54:50 UTC, Walter Bright wrote:
>> http://wiki.dlang.org/DIP61
>
> This is the new grammar?
>
> LinkageAttribute:
> 'extern' '(' identifier '++'? (',' identifier)? ')'
You can also have N.M
|
April 28, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 27 April 2014 at 20:53:31 UTC, Walter Bright wrote:
> Example of what you mean, please.
If the c++ library is "std::" and then later either D or C++ is expanded with a name clash, and the externs are auto generated, e.g. "std.something" appears on both sides, what happens then when you recompile you app?
|
April 28, 2014 Re: DIP61: redone to do extern(C++,N) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On 4/27/2014 7:53 PM, "Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang@gmail.com>" wrote: > On Sunday, 27 April 2014 at 20:53:31 UTC, Walter Bright wrote: >> Example of what you mean, please. > > If the c++ library is "std::" and then later either D or C++ is expanded with a > name clash, and the externs are auto generated, e.g. "std.something" appears on > both sides, what happens then when you recompile you app? I don't know what you mean. D has an excellent system for resolving names that appear in multiple scopes. |
Copyright © 1999-2021 by the D Language Foundation