DIP61: redone to do extern(C++,N) syntax
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 29 13:49:49 PDT 2014
On Tue, 29 Apr 2014 16:00:43 -0400, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> On Tue, 29 Apr 2014 15:52:01 -0400, Walter Bright
> <newshound2 at digitalmars.com> wrote:
>> Because the compiler would now issue an error for that, it's its
>> anti-hijacking feature.
>>
>> Try it and see!
>
> I agree! that was my central point, which Timon seemed to be arguing
> against :)
And in fact, so were you!
On Mon, 28 Apr 2014 16:50:45 -0400, Walter Bright
<newshound2 at digitalmars.com> wrote:
> On 4/28/2014 7:27 AM, Steven Schveighoffer wrote:
>> module foo;
>>
>> void func() {}
>>
>> module bar;
>>
>> extern(C++, foo) void func(); // foo::func in C++ land
>>
>> module prog;
>>
>> import foo;
>> import bar;
>>
>> void main()
>> {
>> func(); // error
>> foo.func(); // ALSO error
>
> No, not an error. Why would it be?
This is EXACTLY the same code that you said would now be an error above!
I think you guys need to reexamine this, and choose one way or another. At
this point, I have no clue as to how it's supposed to work.
-Steve
More information about the Digitalmars-d
mailing list