3 ms·
> every compiler switch is a bug I totally get where this is coming from, but on the other hand it seems like Rust and Zig both get a lot of value from having
by oconnor663 4y ago
> every compiler switch is a bug
I totally get where this is coming from, but on the other hand it seems like Rust and Zig both get a lot of value from having the compiler understand the difference between debug and release modes, and it seems like modern C++ suffers somewhat from not having any built-in way to do something similar. The optimal number of compiler switches might not be zero.
- WalterBright 4y agoD literally has the switches `-release` and `-debug`.
- Yahivin 4y agoIt seems to me that a possible improvement would be for the compiler to error on unreachable code in `-release` and to warn in `-debug`.
- pwdisswordfish9 4y agoWhy don’t you fix those bugs?
- WalterBright 4y ago-release is in there for magazine journalists who run benchmarks. -debug is for project managers to bring order to special debug code.