Hacker News new | ask | show | jobs
by dahfizz 1143 days ago
The term "runtime" is overloaded here. The C runtime is not what people usually mean when they say a language has a runtime.

There is a crt.0 "C Runtime" object. This is code that is literally run "at runtime". When you execute a binary, the C runtime is the first thing executed to setup the stack and call main().

This is just a bit of assembly that runs before main(). It shares ~nothing in common with "runtime" languages like Python or Java where the runtime is alive during the whole program's execution.

The C run time does not handle floats or threads or anything like that. Software floats are dealt with by the compiler and threading is implemented as its own library (either in userspace or built into the kernel).

1 comments

I guess you can educate Microsoft on that then.

https://learn.microsoft.com/en-us/cpp/c-runtime-library/c-ru...

It doesn't matter what people think, rather the CS point of view of a language runtime is.

That library is the runtime.

C implementation without the respective runtime is what is called a freestanding implementation as per ISO C.