3 ms·
For A/B testing, I use this in C++; it looks like it works in rust (according to my syntax highlighter): //* //add/delete the first slash to toggle these blo
by klyrs 7y ago
For A/B testing, I use this in C++; it looks like it works in rust (according to my syntax highlighter):
//* //add/delete the first slash to toggle these blocks
fooA();
/*/
fooB();
/**/
- FartyMcFarter 7y agoI like this for C/C++: #if 1 // or 0 A #else B #endif This can even be nested.
- ncmncm 7y agoThis is so overwhelmingly better in every conceivable way that there is no excuse for ever using the other thing. (Unless you are using Rust and don't have it?)
- klyrs 7y agoYeah, that's good too. When I don't need nesting, I like toggleable comments because the inactive block gets grayed out.
- FartyMcFarter 7y agoSome editors like vim also grey out the text with "#if".