Exceptions in @nogc code

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 6 06:32:55 PDT 2017


On Wednesday, 5 April 2017 at 23:49:00 UTC, Walter Bright wrote:
> Your original proposal listed 3 different kinds of catch, now 
> it seems different. It's clear to me that this is more of an 
> idea than a proposal - a lot more work needs to go into it.
>

It is no different. These aren't special type of catch, no more 
than existing

try { ... }
catch (immutable(Exception) e) { ... }

is a special type of catch.

> For example, adding an `owned` type constructor is a major, 
> major language change. Issues of implicit conversion, 
> overloading, covariance, partial ordering, type deduction, 
> mangling, construction, postblit, TypeInfo, inout, etc., all 
> have to be addressed and worked out. Then there's legacy 
> compatibility, deprecation issues, interaction with other 
> languages, interaction with multiple storage allocators, etc.
>

Most of that was specified in the past and ignored.

> The C# paper is 5 years old, and it has not been adopted by C# 
> for unknown reasons. C# is a much more constrained language 
> than D is, making it more practical for C#. It not being 
> adopted by C# suggests problems with it - perhaps it doesn't 
> deliver the promised results enough to justify its cost?
>

In D, the cost/benefit ratio is higher because it solves problems 
with manual memory management that are irrelevant in C# and 
complete existing type system instead of creating something new.

However, the general idea is getting traction, as you can see 
from Herb's presentation at the CppCon posted in a previous post. 
His goal was to introduce GCed arenas in C++, the basic concept 
is the same.

> I don't believe that a back-and-forth disjointed email chain 
> here is going to resolve the major issues with it. Until a far 
> more thorough design proposal is made, I'm going to bow out.

It was specified to a fairly good extent in the lifetime ML 
(especialy the scope part, was specified in extreme details) and 
got ignored.

You got presented with most of what you are asking for now 
literally years ago and chose to ignore it. What about we start 
from there instead of asking me to redo all the work from scratch 
?

I have people paying me to do useful work, and people who ask me 
to redo some work again and again for free and ignore it. Who do 
you think is getting most of my time ? I like D and all, but 
there are limits.



More information about the Digitalmars-d mailing list