On Friday, 19 May 2017 at 15:45:28 UTC, Mike Parker wrote:
DIP 1008 is titled "Exceptions and @nogc".

As someone who iis interested in @nogc (more precisely: in avoiding GC pauses), I like this proposal... But it looks like people are concerned about 'new' becoming contextual keyword (that in some contexts it allocates with GC and in others it does something else). So maybe different syntax can be used? How about "throw scope Exception"? ("scope" already does various things :)

Instead, we should be asking... How can allocations in Phobos and user code be transferred to an allocation strategy of the user's choosing/needs?

But memory management is not only about allocations, it's also about deallocations! Manually deallocating stuff (like freeing exception objects) is error prone and bothersome. Refcounted exceptions seems to me a pretty good solution (and I think the general plan for D is to use more reference counting? At least, that's my impression...)

Reply via email to