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

Go (and some others, swift surely) cannot be used as a C replacement since they need a runtime.



Just like C does for calling into main(), doing floating point emulation if CPU not available, calling library initializers (common C extension), handling VLA allocations.

Just because it is tiny does not make it inexistent.

Then there is the whole POSIX, which is kind of runtime that wasn't made part of ISO C, but follows it everywhere.


It's not necessarily tiny but it's optional (besides main() ). Linux kernel, baremetal embedded does not use this.


Linux kernel surely used it during the time they had VLAs in, they are now mostly removed thanks to Google efforts reducing memory exploits on the Linux kernel.

One just links another implementation, just like printf() vs printk().


libc.so.6 is about 2MB.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: