r/ProgrammingLanguages • • 37m ago

Discussion Compiling to C

Ive found a lot of languages on this sub compile to c code instead of assembly or a backend. I'm curious what the advantages / disadvantages are to this. I know c is pretty optimized so is this an easy way to make a performant language or does it just make it simpler. I dont know c but I know assembly and some QBE so what are the pros and cons to directly compiling to assembly ( is it just more flexibility? etc...)

2 Upvotes

11 comments sorted by

View all comments

1

u/Key_River7180 Nain. 18m ago

C is very portable and can do a lot of the heavy lifting for you. Cons: harder, much less flexibility