by unwind · 3y ago · 0 comments
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?
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.