Use caution with anonymous types and other new C# language features - (codebetter.com)

submitted by redcapredcap(420) 3 years, 5 months ago

I think Microsoft is making a huge mistake by leaning so heavily on anonymous types as API parameters, particularly in the ASP.NET MVC Framework.  Not only does this make the APIs in the system ugly and error-prone, but it's not intuitive, and there is no intellisense for it because the API is untyped (typed as object) in the case where an anonymous type is expected.  I think we should stick with named types and named methods wherever possible.  I currently don't see a problem with lamda's if they give an advantage over regular arguments. I'm very cautious about automatically using new, unproven language features before we fully understand how they will affect the usability and maintainability of code.  Note:  we have NO track record for the maintainability of these new language features, and they were developed specifically for LINQ, so using them outside of that context is suspect, in my opinion.

add a comment |category: |Views: 14

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story