The "no gc" crowd

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Oct 9 00:51:37 PDT 2013


On 10/9/13 12:01 AM, Mehrdad wrote:
> On Wednesday, 9 October 2013 at 03:39:38 UTC, Andrei Alexandrescu wrote:
>> On 10/8/13 4:45 PM, Jonathan M Davis wrote:
>>> On Wednesday, October 09, 2013 01:04:39 Tourist wrote:
>>>> I thought about an alternative approach:
>>>> Instead of using a (yet another) annotation, how about
>>>> introducing a flag similar to -cov, which would output lines in
>>>> which the GC is used.
>>>> This information can be used by an IDE to highlight those lines.
>>>> Then you could quickly navigate through your performance-critical
>>>> loop and make sure it's clean of GC.
>>>
>>> That sounds like a much less invasive approach no a @nogc attribute.
>>
>> Problem is with functions that have no source available.
>>
>> Andrei
>
>
> Mangle the @nogc it into the name?

That would work. Then anything that doesn't have @nogc counts as an 
allocation, and the corresponding line will be labeled as such. (I 
suspect that would cause a bunch of false positives in systems that 
don't add @nogc systematically.)


Andrei


More information about the Digitalmars-d mailing list