I wrote quite a lot of PowerShell code. I really like the language, except when I don't. And return and outputs in general are among the most infuriating points.
> In PowerShell, the results of each statement are returned as output, even without a statement that contains the Return keyword. Languages like C or C# return only the value or values that are specified by the return keyword.
I don't want all output, no, please, I don't want it. I want something specific and not all the junk around it. So you have to turn into ugly measures like out-nulling everything or searching through your output because there is always possibility that some commandlet outputed something you were not expecting and it will return before the value you actually wished to returned.
And classes are nice and all, but lot's of stuff are not compatible PowerShell 5. And there is also the added complexity.
https://docs.microsoft.com/en-us/powershell/module/microsoft...
Reading through the examples of the unexpected behavior in so many cases is flabbergasting.