Hacker News new | ask | show | jobs
by josteink 4177 days ago
Microsoft found themselves unable to improve the C# language using a compiler written in a lower level language like C/C++ so they've rewritten it in C# to allow further language development and to support more sophisticated language features.

It also has the benefit of the team implementing the language actually dogfooding it, causing natural evolutionary improvements.

I suspect Google is doing this with go for the same reasons.

2 comments

> It also has the benefit of the team implementing the language actually dogfooding it, causing natural evolutionary improvements.

On the other hand, a big risk is that the language will evolve towards being better at writing compilers, which is a highly idiosyncratic task.

Yes, that is a real risk. I have written about this before. It's much more of a risk at the start, when there are no other sizable programs. Now there are plenty of sizable Go programs, so I am not worried about overfitting to compiler development.
cough OCaml cough

I jest, but, "ha ha only seriously". It's an interesting problem when writing languages in themselves, that you need to try not to make your language great for writing compilers and nothing else!

I don't understand how the compiler's implementation language has any bearing on the design of the language it is trying to compile.

You should be able to write an O'Caml compiler in javascript or a Haskell compiler in C.

Rewriting the compiler in C# has the advantage of now being able to offer the compiler as a service to the C# run-time but not sure I see how it could have affected the design of the language.