Is this nogc? dmd and gdc disagree

Kapps via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 13 13:02:36 PST 2016


On Saturday, 13 February 2016 at 00:41:35 UTC, tsbockman wrote:
> On Friday, 12 February 2016 at 23:46:09 UTC, Kapps wrote:
>> You'll encounter this pretty often in Phobos I think. I really 
>> don't think @nogc is ready, and tend to avoid it in my code. 
>> Exceptions are a big reason for it, and lots of functions in 
>> Phobos throw exceptions which prevents them from being used in 
>> @nogc (barring ugly hacks). I don't want to discourage you 
>> before you try it, but I feel like @nogc is not yet worth 
>> using until something is done about issues such as exceptions, 
>> allowing Phobos to properly be able to handle @nogc.
>
> On the other hand... Realistically, the only way that Phobos 
> will reach usability with @nogc, is if people keep trying and 
> complaining when something doesn't work that should.
>
> I guess the problem is that a lot of this stuff requires RC 
> exceptions to be realistically fixable. (Not this case though.)

Yeah. I originally intended to go through and make what I needed 
@nogc, but then I realized that it was pointless thanks to 
exceptions. Hopefully one day...


More information about the Digitalmars-d-learn mailing list