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

The transpiled Go code seems to end up having to use lots of unsafe code, as even this little sample shows... it would probably be impossible to translate C without doing that. Is the resulting binary actually memory safe in any meaningful way, or even safer than the original C?



The unsafe parts, surely not. That's not entirely the point though. Dropping a dependency on C is a big deal in Go: faster calls, no CGO means faster builds and static binaries.

Go also let's you hand-write assembly and link it in, usually for performance reasons, which very much lacks safety guarantees, but has proven to be incredibly useful for optimizing hot code paths.




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

Search: