What would be the consequence of implementing interfaces as fat pointers ?

Manu turkeyman at gmail.com
Tue Apr 1 07:17:33 PDT 2014


On 1 April 2014 22:03, Michel Fortin <michel.fortin at michelf.ca> wrote:

> On 2014-04-01 07:11:51 +0000, Manu <turkeyman at gmail.com> said:
>
>  Of course, I use alias this all the time too for various stuff. I said
>> before, it's a useful tool and it's great D *can* do this stuff, but I'm
>>
>> talking about this particular super common use case where it's used to
>> hack
>> together nothing more than a class without a vtable, ie, a basic ref type.
>> I'd say that's worth serious consideration as a 1st-class concept?
>>
>
> You don't need it as a 1st-class D concept though. Just implement the
> basics of the C++ object model in D, similar to what I did for Objective-C,
> and let people define their own extern(C++) classes with no base class.
> Bonus if it's binary compatible with the equivalent C++ class. Hasn't
> someone done that already?


I don't think the right conceptual solution to a general ref-type intended
for use throughout D code is to mark it extern C++... That makes no sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140402/74451746/attachment.html>


More information about the Digitalmars-d mailing list