News for hackers. Stuff that matters.
Re:Ask HN: What languages used to write computer languages? by dkersten on Saturday January 09, 2010 @08:48PM (#1042432)
A natively compiled language can be written in whatever language you feel is easiest to write the compiler in, so either the language you are most comfortable in or the language with the best parser/code gen libraries.

Once you can compile your languages source code, you could reimplement the compiler in your language, so that it is self hosted. Of course, you can't do this until you can compile your code, hence doing it in another language first.

If your language is interpreted or JIT compiled, running on some kind of VM, then obviously you won't be self hosting, so you need to use a lnaguage which is suitable for executing your language. Most people seem to choose C, I guess because its low level and they want to reduce overhead.

I myself find Python to be nice to write parsers and such in (and it plays nice with ANTLR), though my most successful code generator toy project was written in Clojure.

Re:Ask HN: What languages used to write computer languages? by eru on Saturday January 09, 2010 @11:13PM (#1042626)
And it would be actually a sensible thing to write a C compiler in Python. C is not a very nice language to write complicated programs in --- and compilers don't need C's speed. They just need to produce (correct and) fast code, but they do not need to run bleedingly fast.
Re:Ask HN: What languages used to write computer languages? by smallblacksun on Saturday January 09, 2010 @11:23PM (#1042638)
Um, what? You want your compilers to be very fast, otherwise you end up wasting a lot of developer time (and thus money) waiting for compilation.
Re:Ask HN: What languages used to write computer languages? by j_baker on Sunday January 10, 2010 @01:30AM (#1042752)
Especially for C. It just takes too long to compile.
Re:Ask HN: What languages used to write computer languages? by silentbicycle on Sunday January 10, 2010 @08:34AM (#1043038)
C++ is far, far worse.
Re:Ask HN: What languages used to write computer languages? by barrkel on Sunday January 10, 2010 @01:10AM (#1042732)
You got that backwards. For most development, you want a fast compiler but you don't care so much about the runtime speed, so long as its correct. Also, the more optimizing the compiler, the higher the probability that you'll hit bugs, affecting correctness.
Re:Ask HN: What languages used to write computer languages? by eru on Sunday January 10, 2010 @01:29PM (#1043408)
Then use a C-interpreter for development.