In a word: bootstrapping.
It's a FAQ: http://golang.org/doc/faq#What_compiler_technology_is_used_t...
In a word: bootstrapping.
It's a FAQ: http://golang.org/doc/faq#What_compiler_technology_is_used_t...
I wouldn't be surprised if it's doable with some really clever tricks, but it doesn't seem worth it in terms of maintainability. Just use C or C++.
Or does Rust's optional GC get in the way? I'm not really familiar with that part of the language.
(The compiler currently makes heavy use of `unsafe`, in my understanding. At least for now.)
https://github.com/mozilla/rust/issues/3608
Writing the Go runtime in Go would require the similar ability to do without all the services that are currently provided by the runtime. That is, unless you want your runtime to recursively require itself to infinite depth. :) I'm sure it's theoretically possible, but considering that two of the language's largest selling points are concurrency and memory safety via GC, a theoretical runtime-less dialect of Go would be so near to C that it might not really be worth the effort.
Edit: Forgot to mention that it does not do escape analysis.
Are there actually popular GC implementations that don't use any assembly?
go's void* http://golang.org/pkg/unsafe/#Pointer
go's syscall mmap function. (Pure Go) https://code.google.com/p/go/source/browse/src/pkg/syscall/z...
pure go pkg with more mmap functionality. http://godoc.org/launchpad.net/gommap
Go's runtime mmap function. (C) https://code.google.com/p/go/source/browse/src/pkg/runtime/s...
Go's base memory allocation function. https://code.google.com/p/go/source/browse/src/pkg/runtime/m...
Go functions body may be implemented as asm. The standard math pkg is a great example of this feature. http://golang.org/src/pkg/math/
Considering all of these features there isnt really a whole lot about Go's semantics that prohibit it from being used in many of the low level projects that are typically written in C/C++.