Toughts on alias this. (implict converstion in general)
12345swordy
alexanderheistermann at gmail.com
Wed May 13 21:06:44 UTC 2020
As I am working on the tuple dip and porting Timon Gehr work, I
noticed that there is a section on alias this which got me
thinking. I really don't want the ability to alias this the tuple
itself as that could cause problems in the future. It seems that
Walter share the same negative sentiment regarding alias this. We
could introduce implicit constructors for structs/classes for
rvalues and implicitOP for lvalues by having structs copy it and
having classes GC allocate it. That way we could introduce
implicit conversion without having the rest of the baggage that
alias this introduce.(Credit for manu for coming up the idea). Of
course this is all opt-in from the developer side to prevent
unintentional function design.
- Alex
More information about the Digitalmars-d
mailing list