Yes this has been requested a few times.

I just want to point out that while I like the idea (seeing how well it works in C#), I also think it should be optionally how it is now. There are times when you want to pass and object as ref for optimization only, and aren't actually modifying the value (like Matrix Multiplication for example). In these cases, the way D works right now is nice, because it hides that detail from the end user.

Still, I think 'ref'/'out' should be require at call-site by default, to avoid any gotchas.

I also don't see any problem with UFCS really. I mean, using that syntax is pseudo-OOP and implies the first parameter might be modified in the function.

Reply via email to