Without attending a meeting of the project committee where this was decided, it is difficult to say why this is so.
In this text, I use a method or instance in the sense of a function associated with a specific instance of an object, and I use a function in a mathematical sense. The function takes several arguments and produces a result (which is potentially invalid)
If we do not consider virtual methods, which are more complex, because the actual function that will be called is determined by the execution time, then any method calls are syntactic sugar. If we have two methods described below
internal static class Extensions { public static string FooEx(this MyClass self){ return self.ToString(); } } internal class MyClass { public string Bar(){ var s1 = Foo(); var s2 = this.FooEx(); } private string Foo(){ return ToString(); } }
Both will then be translated into a function call, where the first (and only) argument in both cases will be the object identified by this . If in doubt, look at the IL created for any call to the instance method, and you will notice an additional argument there compared to the declaration in the code. This argument is the this reference, which is always passed as the first argument to the instance method.
Therefore, in the case of the instance method, the compiler still needs to determine which object to pass as the first argument to the function. This is exactly the same thing that it should do if you call the extension method without this , which also means that this cannot be the real reason why you need to use this before the extension method.
In the compiler for Marvin , the compiler compiler on top of the Mono compiler, I had to do a similar trick, since C # does with extension methods and wondered why the specifications require this real reason that the compiler forces you to use this before the extension method says what the specs say about this. What is the reason for this decision, it will take the attention of someone like @EricLippert, which is probably there when they solved this requirement