Extending C# language, how much effort/gain?
<h1>Introduction</h1>

<p>As a developer, I'm involved in writing a lot of mathematical code everyday and I'd like to add very few syntactic sugar to the C# language to ease code writing and reviewing.</p>

<p>I've already read about this <a href="http://stackoverflow.com/q/3969198/684399">thread</a> and this other <a href="http://stackoverflow.com/q/3981825/684399">one</a> for possible solutions and would simply like to know which best direction to go and how much effort it may represent to solve only for the three following syntactical issues*. </p>

<p>*: I can survive without described syntactic sugars, but if it ain't too much work and <em>Rube-Goldberg</em> design for simple compilation process, it may be interesting to investigate further.   </p>

<h1>1. Multiple output arguments</h1>

<p>I'd like to write:</p>

<pre><code> [double x, int i] = foo(z);
</code></pre>

<p>Instead of:</p>

<pre><code> double x;
 int i;
 foo(out x, out i, z);
</code></pre>

<p>NB: <code>out</code> parameters being placed first and <code>foo</code> being declared as usual (or using same kind of syntax).</p>

<h1>2. Additional operators</h1>

<p>I'd like to have a few new unary/binary operators. Don't know much how to define for these (and it seems quite complex for not introducing ambiguity when parsing sources), anyway would like to have something like:</p>

<pre><code>namespace Foo
{
    using binary operator "\" as "MyMath.LeftDivide";
    using unary operator "'" as "MyMath.ConjugateTranspose";

    public class Test
    {
         public void Example()
         {
             var y = x';
             var z = x \ y;
         }
    }
}
</code></pre>

<p>Instead of:</p>

<pre><code>namespace Foo
{
    public class Test
    {
         public void Example()
         {
             var y = MyMath.ConjugateTranspose(x);
             var z = MyMath.LeftDivide(x, y);
         }
    }
}
</code></pre>

<h1>3. Automatic name insertion for static classes</h1>

<p>It's extremely unappealing to endlessly repeating <strong>Math</strong>.BlaBlaBla() everywhere in a computation code instead of writing directly and simply <em>BlaBlaBla</em>. </p>

<p>For sure this can be solved by adding local methods to wrap <strong>Math</strong>.BlaBlaBla inside computation class. Anyway would be better when there's no ambiguity at all, or when ambiguity would be solved with some sort of <code>implicit</code> keyword, to automatically insert class names when required.</p>

<p>For instance:   </p>

<pre><code>using System; 
using implicit MySystem; // Definying for 'MyMaths.Math.Bessel'

public class Example
{
    public Foo()
    {
        var y = 3.0 * Cos(12.0); 
        var z = 3.0 * Bessel(42);
    }

    // Local definition of 'Bessel' function again
    public static double Bessel(double x)
    {
        ...
    }
}
</code></pre>

<p>Would become:</p>

<pre><code>using System; 
using MySystem; // Definying for 'Math.Bessel'

public class Example
{
    public Foo()
    {
        var y = 3.0 * System.Math.Cos(12.0); // No ambiguity at all 
        var z = 3.0 * MySystem.Math.Bessel(42); // Solved from `implicit` keyword 
    }

    // Local definition of 'Bessel' function again
    public static double Bessel(double x)
    {
        ...
    }
}
</code></pre>

<p>* The compiler may simply generate a warning to indicate that it solved the ambiguity because an <code>implicit</code> solution has been defined.</p>

<p>NB: 3) is satisfying enough for solving 2).</p>
