digitalmars.D - Anyone using nogc exceptions (-dip1008)?
- Mike Parker (10/10) Mar 06 2019 Some time ago, Walter asked me to postpone DIP 1008, "Exceptions
- Nicholas Wilson (4/10) Mar 06 2019 No, because It doesn't work.
- Walter Bright (2/3) Mar 23 2019 https://github.com/dlang/dmd/pull/9481
- Guillaume Piolat (3/14) Mar 06 2019 Haven't used it, however we could have a use for it one day as we
- lagfra (22/28) Mar 06 2019 One goal behind my work on Vibe.d and the vibe-http module is to
- Atila Neves (10/16) Mar 06 2019 Well, it doesn't work, as mentioned above. But I've come to use
- Peter Jacobs (9/15) Mar 07 2019 We use it in our compressible flow solver
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. And a small request, if you feel the urge to say something about the DIP process in this thread, please start a new thread instead. I'd like to keep this one on topic so I don't have to dig for the relevant info. Thanks!
Mar 06 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.No, because It doesn't work. https://issues.dlang.org/show_bug.cgi?id=19317 https://issues.dlang.org/show_bug.cgi?id=19463
Mar 06 2019
On 3/6/2019 4:45 AM, Nicholas Wilson wrote:https://issues.dlang.org/show_bug.cgi?id=19463https://github.com/dlang/dmd/pull/9481
Mar 23 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. And a small request, if you feel the urge to say something about the DIP process in this thread, please start a new thread instead. I'd like to keep this one on topic so I don't have to dig for the relevant info. Thanks!Haven't used it, however we could have a use for it one day as we throw manually allocated nogc exception.
Mar 06 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.
Mar 06 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 featureQuite a bit.and, if so, what your experience with it has been.Well, it doesn't work, as mentioned above. But I've come to use it anyway because I'm ok with "this code is nearly nogc, the exception (hah) being exceptions". If it worked (especially the part regarding calling destructors on caught RC exceptions) I'd've already announced this: http://code.dlang.org/packages/nogc But it doesn't, so I haven't. AFAIC all it needs are for the bugs to be fixed.
Mar 06 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.We use it in our compressible flow solver (http://cfcfd.mechmining.uq.edu.au/eilmer/). It is a working research code. We have lots of nogc functions in the core of our solver but really want to be able to throw exceptions. So we throw exceptions with simple messages in the optimized build and, when we want more information, we run the simulation again with a debug build of the code that constructs more informative messages in debug{} blocks.
Mar 07 2019