At first I thought "WIP C" meant something related to the kind of C or of the C compiler, that's why I commented. If you can still change the title, writing "work-in-progress" instead of WIP would be much less confusing.
And good luck in your efforts, you've set some really serious goals.
Terseness is quite a subjective thing, as I think TCC is not all that small among all the C (and C-subset) compilers that exist like Small-C; on the other hand, OTCC is in realm of "too terse" for me.
This one is more agreeable with my style (and I think the parser in it is amazingly concise and elegant):
TCC packs a C compiler, assembler and linker together, So it has a large amount of functionality, even if it is no longer so tiny. The code style is really dense too. Frequently using single letter function and variable names.
e.g. Outputting data into the final data segments uses functions named o() and o32().
The reason why this isn't a Go compiler in Go is probably the same reason why it's a C compiler - the complexity of the language. C seems to be the sweet spot for a language that is relatively easy to write a basic compiler for, but also powerful enough to be used for writing nontrivial software (including compilers.)
I really hope someone writes a Go to C compiler in Go, as combined with my C compiler, they would create an entirely new and self hosting implementation of Go.
14 comments
[ 2.9 ms ] story [ 45.3 ms ] threadI'd love to find collaborators too, though I don't expect anyone to help until less trivial programs are running.
And good luck in your efforts, you've set some really serious goals.
https://github.com/rui314/8cc Got things right, and I am trying continue with it's style.
I will be happy if a student can take my compiler and port it to his own invented cpu with a modest amount of work.
This one is more agreeable with my style (and I think the parser in it is amazingly concise and elegant):
https://github.com/rswier/c4/blob/master/c4.c
e.g. Outputting data into the final data segments uses functions named o() and o32().
I really hope someone writes a Go to C compiler in Go, as combined with my C compiler, they would create an entirely new and self hosting implementation of Go.