Alternative Possibility - Implicit with

Adam D Ruppe destructionator at gmail.com
Sat Nov 19 12:57:33 UTC 2022


On Saturday, 19 November 2022 at 08:49:31 UTC, Walter Bright 
wrote:
> The contextual inference only takes place in certain contexts. 
> Perhaps we can run with that idea.

Would this generalize to struct construction like i mentioned 
here:
https://forum.dlang.org/post/bievvzpabbxddogbmpgu@forum.dlang.org


If you can do an implicit with, you can also do an implicit alias 
of the with subject. And once you have implicit alias you can  
construct a struct which adds to the value significantly.


Actually, I do wish `with` in general had a way to refer back to 
the subject of it. Maybe we could add something there then it'd 
magically apply to the implicit with too.


More information about the Digitalmars-d mailing list