new DIP47: Outlining member functions of aggregates

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Tue Sep 10 01:49:38 PDT 2013


On 10/09/13 09:59, Jacob Carlborg wrote:
> A mixin should not be necessary. RTInfo can be used for that:
>
> https://github.com/D-Programming-Language/druntime/blob/master/src/object.di#L575
>
> The compiler will instantiate RTInfo once for each user defined type. The only
> downside is that you need to modify druntime.

Can you explain a bit more about how that works?

As long as it can provide a guarantee that everything declared has a definition, 
and everything defined has a declaration -- and that they match! -- then I think 
this is probably the solution required.

What I mean is -- it needs to ensure that the issue identified in a couple of my 
earlier posts will be flagged and prevented:
http://forum.dlang.org/post/mailman.1104.1378795749.1719.digitalmars-d@puremagic.com

However, I'm suspicious of anything that would require the programmer to be 
"virtuous" and manually ensure that those checks take place, rather than the 
checks simply being a natural part of the compilation process.


More information about the Digitalmars-d mailing list