Proper way to handle "alias this" deprecation for classes

Inkrementator anon at anon.org
Sun May 7 21:04:05 UTC 2023


On Sunday, 7 May 2023 at 18:19:04 UTC, Ali Çehreli wrote:
> alias this is for implicit type conversions, which can be 
> achieved explicitly as well.

Open question to everybody: What you're opinion on using opCast 
for this? Since it's a type conversion, it seems fitting to me.

And another suggestion: Wrap the class in a struct that has 
visibility on the class members via the "package" access 
specifier and continue using "alias this".


More information about the Digitalmars-d-learn mailing list