4 ms·
I'll just say - I've generated A Great Deal of 'C' code. It's not hard to avoid UB at all. You only use a very concise subset of the language. YMMV. This sound
by ArkyBeagle 10y ago
I'll just say - I've generated A Great Deal of 'C' code. It's not hard to avoid UB at all. You only use a very concise subset of the language. YMMV.
This sounds more like generating 'C' is a distraction rather than a goal.
- steveklabnik 10y agoIt is certainly not impossible. I think it's just presented as a bit more trivial than it is. You can generate C, but is it easy to generate good C? That's what I was trying to get at with the LLVM comments. Rust relies a lot on a good optimizer; a straightforward transformation might be significantly slower.
- ArkyBeagle 10y agoAgreed. I did not mean to minimize the effort involved.