Hacker News new | ask | show | jobs
by roblabla 18 days ago
With that logic, C is nothing without assembly.
2 comments

Does C also have a compiler that turns C code into assembly before the real runtime does its work? Never done much C development in the past, didn't get the impression it worked like that.
> Does C also have a compiler that turns C code into assembly before the real runtime does its work?

What do you think ahead of time compilation is?

> Does C also have a compiler that turns C code into assembly

Yes, that's 'a C compiler', like gcc.

> before the real runtime does its work

Sort of, the program is 'the runtime', but this is backwards, languages that have 'a runtime' get the name from it running at runtime to compile/interpret source or byte code. In C what runs at runtime is just your program, whatever you compiled. (Maybe it's an interpreter though!)

I mean, once you split that sentence into pieces and answer them individually, of course it stops making sense. It's the whole "+ chuck the results into a runtime" that makes it make sense (or not) as a comparison against "TS > JS > V8/SpiderMonkey"
You can output assembly with any toolchain, yes. But there's no runtime, at least if you mean in the sense that the code is executed by a runtime.
a c compiler turns c code into assembly which is then consumed by an assembler(?)
Typescripts add another layer on top of that