How can I change the c#/javascript compiler used inside the editor?

DLLs compiled inside visual studio 2008 are compatible with unity3d.

But the visual studio c# compiler accepts the "var" keyword, lambda functions and other modern syntax constructs that unity3d compiler does not recognize.

Classes, specially MonoBehaviors, created inside visual studio are not threaded the same way by unity3d as those inside the Assets folder. For instance you cannot easily attach them to game objects, neither edit their properties.

There are some hacks like creating an empty class in the Assets directory that subclasses the visual studio compiled class. But those create other problems.

Is there a way to invoke a compiler of my choice from within the unity editor?

Even a hacked way like changing the gmcs.exe inside the editor directory?

See Discussion here for a way to be able to use C# 3.0 in unity, of course totally unsupported and at your own risk :-)

Notice that MonoBehaviours and ScriptableObjects inside external assemblies are currently not supported. I bet you can find a feature request on it to vote up at feedback.unity3d.com.