D/Objective-C, extern (Objective-C)

Jacob Carlborg doob at me.com
Tue Jun 25 02:26:36 PDT 2013


On 2013-06-25 00:39, Steven Schveighoffer wrote:

> I think this is largely false.  In order for the new syntax to be valid,
> you must use extern(Objective-C).  That would be quite an accident.
>
> Consider that I have never dealt with the COM compatibility (or frankly,
> even the extern(C++) compatibility) part of D whatsoever.  Because I've
> never implemented IUnknown, or used extern(C++).

I agree, I never used those either.

> These features that are enabled by specific syntax are not extra
> complexity for D.
>
> Note that TDPL makes no mention of IUnknown or COM compatibility, yet I
> have never seen a post on D.learn asking questions about this feature
> set unless they were actually looking to write COM code.  In other
> words, no accidental enabling (I have seen questions as to why
> interfaces are not Objects, and I grudgingly have to point to the
> incorrect belief that COM objects cannot be discerned from normal D
> objects at compile time).
>
> On the other hand, something like shared and const are pervasive,
> because they are core language features, AND because they are used
> throughout libraries.
>
> I think it is important to consider the applicability to normal code
> when introducing such binding features.  The way this is to be
> introduced is the correct level of access -- only enabled with a
> specific directive.

Well put, you said it better than I ever could.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list