Disable GC entirely

Dicebot m.strashun at gmail.com
Mon Apr 8 00:53:46 PDT 2013


On Monday, 8 April 2013 at 04:30:56 UTC, Manu wrote:
> I wonder if UDA's could be leveraged to implement this in a 
> library?
> UDA's can not permute the type, so I guess it's impossible to 
> implement
> something like @noalloc that behaves like @nothrow in a 
> library...
> I wonder what it would take, it would be generally interesting 
> to move some
> of the built-in attributes to UDA's if the system is rich 
> enough to express
> it.

Both blessing and curse of UDA's is that they are not part of 
type and thus mangling. I think it is possible to provide library 
implementation of @nogc for cases when all source code is 
available, but for external libraries and separate compilation it 
will become matter of trust which is hardly good.


More information about the Digitalmars-d mailing list