@nogc exceptions?
Seb
seb at wilzba.ch
Sun May 19 18:15:43 UTC 2019
On Sunday, 19 May 2019 at 06:09:41 UTC, Petar Kirov [ZombineDev]
wrote:
> On Sunday, 19 May 2019 at 05:59:11 UTC, Manu wrote:
>> On Sat, May 18, 2019 at 10:20 PM Nicholas Wilson via
>> Digitalmars-d <digitalmars-d at puremagic.com> wrote:
>>>
>>> On Sunday, 19 May 2019 at 05:05:32 UTC, Manu wrote:
>>> > > [...]
>>>
>>> pass -preview=dip1008 to the compiler
>>
>> Oh right. Is this a breaking change or something?
>
> Yes, at minimum it changes the type checking of the `throw new
> <Ex>` expression (e.g. it's no longer not @nogc). It also makes
> such exceptions not garbage collected, but reference counted,
> so the user should not keep an exta reference around as the
> compiler and the runtime can't track that.
> But most of all, such changes needs to be tested with a larger
> set of third-party libraries before we can consider tuning them
> on by default. Some projects have already started doing that,
> but we're still in the early stages.
Well as long as druntime and Phobos don't compile with it, it's
unlikely that third-party projects will pick it up.
See e.g. https://github.com/dlang/dmd/pull/8508
More information about the Digitalmars-d
mailing list