Little demo of allowing basic types to implement interfaces.

Rory McGuire rjmcguire at gmail.com
Wed Sep 4 04:01:28 PDT 2013


yip, :) can't think of a reason except it was interesting. wish dmd didn't
segfault when I used __MODULE__.

on the plus side the requirement for a non basic type is the same
requirement that #golang has on its interfaces.




On Wed, Sep 4, 2013 at 12:48 PM, Dicebot <public at dicebot.lv> wrote:

> On Wednesday, 4 September 2013 at 10:33:26 UTC, Rory McGuire wrote:
>
>> I have a basic solution but it can't handle basic types LOL! you have to
>> typedef them so that moduleName!T works.
>>
>
> Of course it can't, built-in types don't have any owning module, those are
> not symbols. Why would you want to care about basic types anyway?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20130904/00ec1850/attachment.html>


More information about the Digitalmars-d-announce mailing list