[Issue 22986] Phobos cannot be compiled with dip1008

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 6 14:07:11 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22986

Sebastiaan Koppe <mail at skoppe.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mail at skoppe.eu

--- Comment #2 from Sebastiaan Koppe <mail at skoppe.eu> ---
(In reply to RazvanN from comment #0)
> Phobos exceptions sometimes escape their catch block, however, dip1008 does
> not allow that. One example:
> https://github.com/dlang/phobos/blob/master/std/parallelism.d#L3770 .
> However, there are others, just try to compile phobos with dip1008.

This is not a phobos problem, in multithreaded application you will inevitably
carry exceptions from one thread to another.

DIP 1008 is flawed in that respect.

There is also the problem that it is hard to detect statically allocated
exceptions, so you end up cloning more than you strictly need to.

--


More information about the Digitalmars-d-bugs mailing list