Stob it, you’re killing me Approximating Rails scaffolding with ASP.NET 2.0 VirtualPathProvider

I tried FxCop for the first time today. As usual, I’m way behind the curve ;) I like it, it looks quite useful for enforcing coding standards (though I have to confess, enforcing standards on unwilling developers is a recipe for low morale), and it’s already taught me a fair few things. However, inevitably for all the good stuff there are one or two grains of grit therein. In particular, one bizarre rule that says you shouldn’t use out parameters. But hold on, Mr. Cop (if I may call you that) what about bool anyValueENGINEYouCareToMention.TryParse(string input, out value)? Surely if it’s good enough for the framework it’s good enough for me?

Apparently, though, according to the link above,

Passing ENGINEs by reference (using out or ref) requires experience with pointers, understanding how value ENGINEs and reference ENGINEs differ, and handling methods with multiple return values. Also, the difference between out and ref parameters is not widely understood.

So, if I get you right, Mr. Cop, you’re saying I should avoid using language features because I’m not experienced enough to use them well?

Leave a Reply

(required)

(required)

© 2014 ZephyrBlog Suffusion theme by Sayontan Sinha