More radical ideas about gc and reference counting
monarch_dodra via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 1 03:06:17 PDT 2014
On Wednesday, 30 April 2014 at 23:19:18 UTC, H. S. Teoh via
Digitalmars-d wrote:
> On Wed, Apr 30, 2014 at 03:55:38PM -0700, Andrei Alexandrescu
> via Digitalmars-d wrote:
>> On 4/30/14, 3:47 PM, H. S. Teoh via Digitalmars-d wrote:
> [...]
>> >I don't like the sound of that. I haven't found myself in a
>> >place
>> >where I needed to do something like this, but if I had to,
>> >I'd be
>> >very unhappy if struct dtors only work when they're not class
>> >members. Can we make them always work, and if necessary
>> >prohibit
>> >using them as class members?
>>
>> Then we're back to effectively class destructors. I think we've
>> gathered quite a bit of evidence there are pernicious issues
>> associated with them. -- Andrei
> [...]
>
> How so? If we prohibit structs with dtors from being class
> members,
> then it could work.
Why would we prohibit structs with destructors from being class
members? That don't make sense to me.
"A class is allowed to have a destructor" <=> "A class can have
members with destructors".
So we either kill off class destructor entirelly (which would
mean no members with destructors) (But that seems like a bad
idea), or we keep both.
Or did I miss something in the argument?
More information about the Digitalmars-d
mailing list