2 ms·
Just to add some clarification, I think what you mean is that one alternative way is to split implementations apart where necessary, and have separate translati
by unwind 3y ago
Just to add some clarification, I think what you mean is that one alternative way is to split implementations apart where necessary, and have separate translation units for various targets.
That can lead to a cleaner implementation without conditional compilation (or with conditional compilation restricted to picking the right files).
What other method(s) were you thinking of?
- fsckboy 3y ago> What other method(s) were you thinking of? runtime conditional configuration anything Rust can do, C can do, C can even implement Rust. I'm not saying that you shouldn't prefer Rust, I'm sure it has nice features, i was just trying to clarify confusion about what C "requires" you to do. People use a lot of define blocks, but I don't. It's a throwback to wanting to minimize code size at compile time from back when that was important.