Why do you continue to use D?

Steven Schveighoffer schveiguy at gmail.com
Tue Jun 9 14:08:24 UTC 2020


On 6/9/20 9:54 AM, 12345swordy wrote:
> On Tuesday, 9 June 2020 at 00:55:44 UTC, Manu wrote:
>> On Tue, Jun 9, 2020 at 4:15 AM 12345swordy via Digitalmars-d < 
>> digitalmars-d at puremagic.com> wrote:
>>
>>> On Monday, 8 June 2020 at 06:51:59 UTC, Manu wrote:
>>> > [...]
>>>
>>> To bad that @nogc is useless when it comes to manual memory 
>>> management when it comes to classes as it doesn't work well at all 
>>> with the class deconstructor.
>>>
>>>
>>
>>  What do you mean?
> 
> You can't call the destroy function for classes in a @nogc context. The 
> de-constructor is not virtual, because of this, it doesn't inherent the 
> attributes.

That's true of classes with most attributes in general.

For example, you can't compare objects for equality in @safe code.

This was the point for the ProtoObject idea.

-Steve


More information about the Digitalmars-d mailing list