3 ms·
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 f
by userbinator 12y ago
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.)
- andrewchambers 12y agoIts not too bad to write a Go compiler in Go, simply because of this package https://godoc.org/golang.org/x/tools/go/ssa https://godoc.org/golang.org/x/tools/go/ssa by the Go team. 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.