4 ms·
I think C#'s designers make it clear that they don't want you to use out parameters. They're a hack; they were only included at all to make it easier to communi
by Analemma_ 10y ago
I think C#'s designers make it clear that they don't want you to use out parameters. They're a hack; they were only included at all to make it easier to communicate with C/C++ libraries. But now that they're there, they have to stay because of back-compat - Microsoft definitely does not want a Python 3 situation. They might as well make them as painless as possible for the people stuck with them because of some library. And at the same time, they should offer a compelling alternative to out parameters, which they have finally done with tuple returns.
- voltagex_ 10y agoI mentioned this in another thread, but I wish they'd tell the Visual Studio Team not to use them, then - The SOAP and WCF tools will still happily generate code that requires out parameters.
- Pxtl 10y agoPeople still use WCF? I suffered enough getting one project running with Windows Configuration Fuckup. Never again.
- ShinTakuya 10y agoSome of us are stuck using them as part of legacy systems. We're eliminating them as we move to a newer stack but legacy code can be quite sticky.
- smoothdeveloper 10y agoHow can they be considered a hack when they get baked in the BCL in so many places as well, not for interop purpose?