Static struct initialization syntax behavior & it being disabled upon adding a constructor
    cc 
    cc at nevernet.com
       
    Mon Apr 18 08:22:26 UTC 2022
    
    
  
On Monday, 18 April 2022 at 03:21:30 UTC, H. S. Teoh wrote:
> Structs in D ought to be treated like "glorified ints", as 
> Andrei puts it. If you need complex ctors and complex methods, 
> that's a sign you should be using a class instead.
Unless you're having a nice quiet get-together with friends, and 
you don't want to invite the GC, the biggest loudest party animal 
on the block.  Phobos's RefCounted seems to stretch the 
definition of "glorified ints"..
    
    
More information about the Digitalmars-d-learn
mailing list