Why are structs and classes so different?

Ali Çehreli acehreli at yahoo.com
Mon May 16 22:16:26 UTC 2022


On 5/15/22 21:20, Tejas wrote:

 > Never say never :
 >
 > https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md

Thanks! I am reading it now.

 > Also, there's `opPostMove` already within the language

I see: It indeed appears on some pages on dlang.org but the language 
spec has no mention of it. :) It looks like a DbI (design by 
introspection) thing in Phobos or core.

It looks like structs with self references are allowed now as long as 
they do the right thing in their opPostMove. Cool...

Ali



More information about the Digitalmars-d-learn mailing list