Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pet peeve of mine: "X compiler/interpreter/JIT written in X".

Case in point five years and 150k+ lines with the slow Scala compiler written in Scala (it's conceptual slow because of the language (types, implicits, ...) and it's accidentally slow because written in Scala (a slow language) on the JVM (slow startups and warmups)). I do get the coolness, the eat your own dog food, the I-write-X-in-X-because-I-obviously-like-X-otherwise-I-would-not-create-it-duh, but as a user I hate it.

I would prefer "X written in A" where A is the reasonably fastest language, e.g. Rust.

I love the Go compiler for speed.




> it's conceptual slow because of the language (types, implicits, ...) and it's accidentally slow because written in Scala (a slow language) on the JVM (slow startups and warmups)

Do you have reason to believe that the accidental part matters to any significant degree?

I mean, C++ compilers are notorious for being slow and most of them are written in C++, which is one of the fastest languages around. It seems to me that, if your language is conceptually slow to compile, the fastest implementation language in the world won't fix that problem for you.

On the other hand, if your language is conceptually fast to compile, a slowish implementation language won't hurt much (I've never heard any complaints about the speed of `javac` for example though I've heard plenty of complaints about the speed of Java in general).


> I love the Go compiler for speed

Wait till you find out what the Go compiler is written in then.



Only for the build time to take a nosedive when they ditched C.

Explained here, by a factor of 2.

https://golang.org/doc/go1.5#performance


True, and as they explain,

> Builds in Go 1.5 will be slower by a factor of about two. The automatic translation of the compiler and linker from C to Go resulted in unidiomatic Go code that performs poorly compared to well-written Go. Analysis tools and refactoring helped to improve the code, but much remains to be done. Further profiling and optimization will continue in Go 1.6 and future releases.

And as of Go 1.17 that is pretty much forgotten waters.


In one of the fastest languages, X==A :-)


If you want to know more about WHY people write compilers for X in X, check out https://en.wikipedia.org/wiki/Bootstrapping_(compilers)

It's not just liking the language or eating their own dogfood.


Maybe but it's a great learning tool for those of us that know ruby but are less familiar, with say, C or Rust.


Well, you could apply the futamura projections and have “X written in Y compiles to Z”




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: