Why do you continue to use D?

12345swordy alexanderheistermann at gmail.com
Tue Jun 9 18:12:41 UTC 2020


On Tuesday, 9 June 2020 at 16:43:21 UTC, Timon Gehr wrote:
> On 09.06.20 17:45, 12345swordy wrote:
>> On Tuesday, 9 June 2020 at 15:29:39 UTC, Timon Gehr wrote:
>>> [...]
>> 
>> This is the first bug that I had encounter first hand when 
>> programming in d. An bug that hasn't been fixed in years!
>> 
>> It can be fix by having the druntime providing a interface say 
>> "Dispose" and just have the destroy function call that and 
>> leave the old deconstructors alone.
>> 
>> The fix itself is heavily inspired by c# language.
>> https://docs.microsoft.com/en-us/dotnet/api/system.idisposable.dispose?view=netcore-3.1
>> 
> I don't think that's necessary. Destructors should just inherit 
> the base class destructor's attributes, then `destroy` can 
> annotate itself with appropriate attributes.
>
> Also see: https://issues.dlang.org/show_bug.cgi?id=20914
Which in order for that to happen it needs to be virtual 
function, not a static function.


More information about the Digitalmars-d mailing list