Anyone using @nogc exceptions (-dip1008)?

lagfra me at fragal.eu
Wed Mar 6 14:08:51 UTC 2019


On Wednesday, 6 March 2019 at 12:36:56 UTC, Mike Parker wrote:
> Some time ago, Walter asked me to postpone DIP 1008, 
> "Exceptions and @nogc". Subsequently, an implementation was 
> merged behind the -dip1008 flag. In helping to determine how to 
> move forward with the DIP, we'd like to know if anyone is 
> actually using the feature and, if so, what your experience 
> with it has been.


One goal behind my work on Vibe.d and the vibe-http module is to 
increase @nogc
compatibility. Exceptions are widely used in Vibe.d and this is 
one of the
deal-breakers against this goal.
I haven't actually used @nogc exceptions yet, but it would 
definitely help
projects such as Vibe.d that are trying to give users control 
over memory
management and allocation strategies, without having to rewrite 
existing
exception handlers using e.g. `stdx.allocator`.

As an example, the HPACK library that is currently being used in 
vibe's new http2
module would be fully @nogc compatible if it wasn't for 
exceptions. See these
design constraints:

https://github.com/vibe-d/vibe-http/wiki

If there's some interest on resuming this DIP I would be happy to 
start testing
@nogc exceptions in my modules.


More information about the Digitalmars-d mailing list