DIP22 : Private symbol visibility

Jacob Carlborg doob at me.com
Wed Jan 30 04:02:44 PST 2013


On 2013-01-30 10:57, deadalnix wrote:

> I understand the risk of breakage. But . . .

Not worth the breakage.

> Is this code supposed to work in the first place ? I mean, the private
> function is not marked export, the language make no guarantee it will be
> accessible from C.
>
> Additionally, does it make sense to prevent D from calling some piece of
> code, but still allow some external C code to do it ?
>
> I think it is invalid code in the first place, and just happen to work
> right now.
>
> case 2 is more tricky, but export isn't involved here.

It's not just accessing from C code. Due to D supporting separate 
compilation you can have the implementation of a private method in a 
separate object file.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list