forcing "@nogc" on class destructors

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 22 08:51:42 PST 2015


On 1/22/15 11:10 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Thursday, 22 January 2015 at 14:07:31 UTC, Steven Schveighoffer wrote:
>> resources) and everything works fine. And the runtime catches any
>> slips with an appropriate handling (abort instead of corrupt memory).
>
> Runtime errors that could have been a compile time error should always
> be caught at compile time. Spurious runtime errors are just as bad as
> null pointer accesses.

Well, code that does not have errors should not be caught at compile 
time. I count writeln("in dtor") as one of them.

You may disagree, but we aren't making progress on this.

-Steve


More information about the Digitalmars-d mailing list