Hacker News new | past | comments | ask | show | jobs | submit login

Cgo exists because goroutine stacks are small and grow on demand. C/C++ expect large fixed size stacks. While you can technically call into C++ without going through cgo (see https://github.com/petermattis/fastcgo), you can't avoid the stack problem. Cgo solves it by switch from the goroutine stack to the stack of the thread underlying the goroutine.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: