Matt DotsonMatt Dotson

My feedback

  1. 133 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      25 comments  ·  Visual Studio IDE » .NET  ·  Flag idea as inappropriate…  ·  Admin →
      Matt DotsonMatt Dotson commented  · 

      I do agree that .NET should have a dependency injection framework in it. It should also have a standard interface that ninject, autofac and all the other DI frameworks could implment so I can swap out for a different DI framework if I want.

    • 722 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        under review  ·  8 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
        Matt DotsonMatt Dotson supported this idea  · 
      • 157 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          45 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
          Matt DotsonMatt Dotson commented  · 

          It might be nice to know what could be thrown, but the tool should be able to figure that out using static analysis (as long as you're calling verifiable code). I don't think you should have to specify it, and I don't think you should be forced to handle it. This seems like something better for tooling than language.

        • 955 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            17 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
            Matt DotsonMatt Dotson supported this idea  · 
            Matt DotsonMatt Dotson commented  · 

            You don't even need to change the syntax!! You just need to make the compiler a little smarter. Make the compiler resolve ambiguous type errors by matching the method signature. If the two types have a matching method with the exact same signature, then make a compiler error, but you have enough info to resolve the right type in 99% of the cases.

            namespace MyExtensions
            {
            public static class Math
            {
            public static int SomeMethod(int x)
            {
            return 0;
            }
            }
            }

            namespace Sample
            {
            using System;
            using MyExtensions;

            public class Foo
            {
            public void Bar()
            {
            var x = Math.SomeMethod(5); // <<<< Currently an ambiguous type error.
            }
            }
            }

          Feedback and Knowledge Base