Settings

Theme

C-code generation considered unnecessary: go directly to binary, do not pass C

arxiv.org

2 points by bouchard a year ago · 3 comments

Reader

zoezoezoezoe a year ago

yes and no. The reason we prefer going to C is because of C's massive adoption, whatever you're writing, if you cant use C with FFI, you can basically write it off. Technically C does has some sense of a standard, but not really, if you want to use C, its easiest to generate C and then use C with C.

You dont always need C, if you want to write everything in your preferred language, keep everything in Rust, or Julia, or Zig, or whatever, go ahead, you will probably have a better experience too since you dont have to generate bindings or any of that nonesense, but no one wants to rewrite OpenSSL or something like that in their preferred language, it's always going to be C.

compressedgas a year ago

They don't go directly to binary. They go to LLVM bypassing the C front end.

  • jeffbee a year ago

    It's all equivalent to me. C is code that targets the C "abstract machine". LLVM IR targets an "abstract machine". "Binary" also targets a abstract machine that may happen to have a hardware implementation.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection