DIP18: Non-GC threads

Dmitry Olshansky dmitry.olsh at gmail.com
Sat Sep 1 05:29:28 PDT 2012


On 01-Sep-12 15:47, Piotr Szturmaj wrote:
> bearophile wrote:
>
>> The Koka language has a function annotation similar to @noheap, I have
>> discussed a little about Koka here:
>> http://forum.dlang.org/thread/ocxmiolhlcysehbjtcop@forum.dlang.org
>> but Koka has type inference for effects, so often you don't need to add
>> that annotation to functions.
>
> Well, __traits(hasGCallocations, func) will also do the trick.

Make it __traits(hasAttribute, "nogc", func) and that might be something.
Actually, I'd love to see some proposal that
a) clarifies how @attributes are supposed to be used
b) adds generic infrastructure to to use them via __traits or whatever

-- 
Olshansky Dmitry


More information about the Digitalmars-d mailing list