Is there something fundamentally different about the languages that allows F# to have the interactive console but makes it difficult to implement it for C#?

Yes.

F# is a descendant of the ML programming language, which in turn was heavily influenced by languages like Lisp and Scheme. Those languages were designed from day one to have three nice properties.

First, those languages do not really have statements the way you think of them in C#. Rather, almost everything is an expression that has a value, so an evaluate-and-then-print-the-value mechanism makes sense in almost every situation.

Second, those languages discourage programming with side effects, so you can make evaluations without worrying that you’re going to be messing up global state.

Third, most of the work you do in those languages is “at the top level”; there is typically no enclosing “class” or “namespace” or other context.

By contrast, C# emphasizes programming control flow with statements that produce side effects, and those statements are always in multiple nested containers -- a namespace, a class, a method, and so on.

So these are all things that make it harder for C# to have a REPL, but certainly not impossible. We’d just need to figure out what the semantics are for statements and expressions that appear outside of the usual context, and what the semantics are of mutations that change name bindings, and so on.

Why does F# have an interactive mode but not C#?

Because the F# team decided that having a REPL loop was a priority-one scenario for them. The C# team historically has not. Features do not get implemented unless they are the highest priority features that fit into the budget; until now, a C# REPL has not been at the top of our list.

The Roslyn project has a C# REPL (and will eventually have a VB REPL as well, but it is not ready yet.) You can download a preview release of it to see how you like it at

http://www.microsoft.com/en-us/download/details.aspx?id=27746