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

Manu turkeyman at gmail.com
Sun Mar 30 20:24:58 PDT 2014


On 31 March 2014 12:21, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 3/30/2014 6:33 PM, Manu wrote:
>
>> This is an interesting idea. Something I never thought of, and I think I
>> like it!
>>
>
> Frankly, I don't know why you use classes at all. Just use structs.
>

Reference types are very useful. Most programmers are familiar with this
workflow, and it's a convenient way of modelling lots of problems.

I do find myself using a lot more struct's in D though, but that doesn't
void the traditional approach. And I also maintain that these things are
important particularly as a bridge for new D users.
I also feel quite dirty using pointers in D where there is a dedicated
reference type available. I don't want * and & to appear everywhere in my D
code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140331/11cc2731/attachment.html>


More information about the Digitalmars-d mailing list