D has become unbearable and it needs to stop

Adam D Ruppe destructionator at gmail.com
Thu Jun 15 12:37:09 UTC 2023


On Thursday, 15 June 2023 at 02:44:59 UTC, Chris Katko wrote:
> Tell any other object about yourself in the constructor? 
> segfault. Because your object isn't constructed till _after_ 
> the constructor runs. There's a gotcha.

What case triggers this? I've heard of most the other things but 
this one I can guess a couple things on but I'm not sure.

> Not adding a feature I can use like [private] for classses (if 
> I understand correctly, they don't do anything in D)

The `private` keyword always applies on the module level, so a 
private class member can be seen inside its module but not 
outside it.


More information about the Digitalmars-d mailing list