So, when planning my JIT/compiler infrastructure project, I considered five languages: C, C++, C#, F#, D. I initially wrote it in C#, which quickly turned out to be a pain, mostly because of the restrictions .NET and Mono impose: You can't use signals because it would disrupt the runtime itself. I then thought about using C, but quickly turned away from this idea, because it wouldn't be very convenient for a tree object model (and generally for a sane API). C++ seemed like the ideal thing to pick then (despite the language's terribleness in general), but that also turned out to be a nightmare due to virtually everything being undefined or implementation-defined. That was when I discovered D: C(++) done right. I'm now writing this thing in D and so far, I'm very pleased.
Before all those languages, however, I considered using F#. I love the expressiveness of functional languages, and I love pure and safe code. But I'm not quite sure a functional language is the right tool for the job when it comes to something as low-level as a JIT compiler. (I can certainly see F# being useful for the compiler infrastructure though.) JITting is inherently unsafe and impure because it involves mutating shared memory. You generally have to work against the functional mindset here. Furthermore, there's the issue of performance: Pure functional code doesn't necessarily perform well (this obviously depends on the actual code). In F#, we fortunately have the mutable keyword for cases where we have to squeeze out every drop of performance, but all things considered, a JIT and a GC will need every drop. This leads me to think that there wouldn't be much advantage in using a functional language for this project; I think I'd end up working against the language rather than with it. Languages like C or D seem better for these things.
(This was a bit of a brain dump. I hope it makes sense.)
What do you folks think? Is my assessment regarding functional languages and tools like JIT compilers/GCs reasonable? Am I overlooking something? I just want to make sure I'm not making functional languages seem worse than they are for these tasks.