HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by Ericson2314 | Hacker News Reader
Parent
Full thread
Ericson2314
·
Can you write the GC for go in go?
View on HN
yellowapple
·
Go is self-hosting (i.e. Google's Go compiler is written in Go and is able to compile itself). I would assume that includes the garbage collector.
Ericson2314
·
Nope it does not. Writing the compiler self hosting has nothing to do with writing the run time system.
yellowapple
·
https://github.com/golang/go/tree/master/src/runtime
There's some assembly in there, but it seems to be mostly Go.
fiddlerwoaroof
·
People have written GCs for lisps in (non-allocating subset of) the target language
Ericson2314
·
Yes they have. It's a great approach. Does Go have a precisely defined subset for this?
pjmlp
·
Yes, in fact that is the case with the reference compiler.
tomohawk
·
You need a Go compiler to compile Go, so yes.
Ericson2314
·
https://news.ycombinator.com/item?id=20522115
as I say here, this is unrelated.
Reply on news.ycombinator.com