@gc attribute for bypassign @nogc
bitwise via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jul 26 13:38:32 PDT 2016
On Tuesday, 26 July 2016 at 02:49:59 UTC, ketmar wrote:
> On Tuesday, 26 July 2016 at 02:42:52 UTC, bitwise wrote:
>> Something like @warngc could work nicely. It could function
>> exactly as @nogc with the exception that it issued warnings
>> instead of errors.
>
> i don't think that it will be added, though. but you can
> emulate it with external utility: either with dscanner (writing
> your own linter), or with "-vgc" and then using simple regexp
> to find in which function the reported line is in. somewhat
> messy, but it is the way to get the work done without waiting
> for new attr. ;-)
Actually, thinking about this a bit more, I think @warngc would
be bad anyways. Code that was basically which worked exactly as
is was designed to would issue errors, which would be bad.
Writing a custom linter is not an option. Not only because of the
work/maintainence involved, but because it would complicate
workflow. What I want is easily achieved during compilation.
My goal is to proactively deal with allocations that are in
places that they shouldn't be 90% of the time, like per-frame
updates in a real-time application or game.
Bit
More information about the Digitalmars-d
mailing list