hasElaborateDestructor

Luna luna at foxgirls.gay
Sun Apr 27 22:01:11 UTC 2025


On Sunday, 27 April 2025 at 21:43:26 UTC, claptrap wrote:
> What the heck does elaborate mean in this context? I mean a 
> type has a destructor or not right? Why is a struct destructor 
> called "elaborate" and a class destructor not?
>
> Or is this just another case of programmers cant think up 
> sensible names for stuff?

Elaborate refers to destructors which are not automatically 
generated by the D compiler; eg. If you have a type with subtypes 
that can be destroyed D will automatically set up a destructor 
that handles the destruction chain for you. But if you define 
your own destructor; potentially in a template your destructor 
now becomes elaborate since it has more functionality than just 
ensuring its children are destroyed if needed. Elaborate 
destructors only apply to structs however, not classes.



More information about the Digitalmars-d mailing list