C++ interop - class vs struct
Idan Arye via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 11 03:53:38 PDT 2014
On Thursday, 11 September 2014 at 09:09:41 UTC, Dicebot wrote:
> On Thursday, 11 September 2014 at 07:58:14 UTC, Andrei
> Alexandrescu wrote:
>> On 9/11/14, 12:57 AM, Daniel Murphy wrote:
>>> "Andrei Alexandrescu" wrote in message
>>> news:lurk9p$123f$1 at digitalmars.com...
>>>
>>>> I think attributes would be the go-to approach. -- Andrei
>>>
>>> Why?
>>
>> Because they postdate pragma :o). I'm fine either way. --
>> Andrei
>
> Those are different tools. Attributes are part of language
> semantics, pragmas are to work with compiler internals. It is
> not
> like we have `getPragmas` trait.
>
> I agree that this is better fit for a pragma.
Also, there already is a pragma for controlling the mangling, so
it'll be easier to extend it. Something like:
extern (C++) pragma(mangle, struct) interface E {
int bar(int i, int j, int k);
}
More information about the Digitalmars-d
mailing list