Making AssertError a singleton
Shachar Shemesh via Digitalmars-d
digitalmars-d at puremagic.com
Mon Dec 12 11:54:22 PST 2016
On 12/12/16 17:51, Andrei Alexandrescu wrote:
> Here it is:
>
> https://github.com/dlang/druntime/pull/1710
>
> It relieves code that uses assert from needing the GC. I think all
> Errors should be singletons - multiple objects in that hierarchy
> arguably make no sense. But of course there are many situations out
> there. If this breaks your code, please holler.
>
>
> Andrei
As you may know, Weka has a huge GC aversion. Despite that fact, I fail
to see the improvement such a change would bring. The only situation
under which using the GC is not harmful is when the entire process is
about to go kaboom anyways.
Now, if you'd make regular Exceptions GC free....
Shachar
More information about the Digitalmars-d
mailing list