5 ms·
It doesn't. I've tried it as an experiment a long time ago but was very unsatisfactory. I've already did some other transpilers to C in the past and can say th
by jezek2 4y ago
It doesn't.
I've tried it as an experiment a long time ago but was very unsatisfactory. I've already did some other transpilers to C in the past and can say that it is a terrible compiler target (you'll hit a lot of edge cases pretty fast with sometimes really awkward workarounds and very slow and memory hungry compilation).
Unless you're doing something very close to C the optimizations don't really help for performance either.
A fully optimizing AOT compiler is on the plan in a more distant future. I might try to revisit the idea to output to C from an already language specific optimized compiler output. Probably again as an experiment only. I don't see much of the upsides.
- danielEM 4y agoTechnically the only reason I'm still looking for languages that transpiles to C is an sdcc compiler that supports tons of microcontrolers that can't be programmed with anything else than C or assembly. So I guess, if you were to make an effort to make another target that is not C then LLVM would be probably a better spent time.