C++ Style Opinions

@CppStyleOpinion

Offering helpful insight into why your co-workers hate your code.

Joined November 2015

Tweets

You blocked @CppStyleOpinion

Are you sure you want to view these Tweets? Viewing Tweets won't unblock @CppStyleOpinion

  1. Feb 4

    One Alternative Bracing Sale: <iostream> ;int main() { ; int three{3} ; int four{4} ; std::cout << three + four << std::endl ;}

  2. Retweeted
    Feb 4

    The opinions of so-called compiler warnings—which essentially take creativity away from our programmers—are ridiculous and will be ignored!

  3. 17 Feb 2016

    Forget class polymorphism. Just use `std::function` properties instead of methods. Now you have instance polymorphism!

  4. 28 Dec 2015

    Use tri- and digraphs for x-platform code: ??=include <iostream> int main(void)??< int??(5:> a%<1,2,3,4,5??>; return a:<0??)??/ ; %>

  5. 8 Dec 2015

    When on fire or in doubt run in circles write to std::cout

  6. Retweeted
    5 Dec 2015

    The first Core Guidelines checkers are now available from Microsoft (Clang versions are in also in the works):...

  7. 2 Dec 2015

    Type aliases with `using` make your code cleaner by giving long, typo-prone templated types a useful and readable name. using string = int;

  8. 1 Dec 2015

    Never declare a type explicitly again. `auto` and `decltype` keep your code DRY! auto szInt{1.0}; decltype(szInt) piString;

  9. 30 Nov 2015

    Use Reverse Hungarian Notation for variable naming: take the variable type, and prefix it with some random letters. ex: `int szInt`

  10. 30 Nov 2015

    The only thing I understand about expression SFINAE is that is dead to me until they fix it.

  11. 27 Nov 2015

    snake_case for pretending you're part of . CamelCase for pretending you're coding in . ALL_CAPS for coding REALLY LOUDLY.

  12. 26 Nov 2015

    Why are you reading this? It's Thanksgiving 🦃! Don't you have a side-project to work on?

  13. 25 Nov 2015

    SDKs that want to offer robust ABIs use the PIMPL idiom. _Really_ robust SDKs use PPIMPL. _You_ can do better: use PPPIMPL.

  14. 25 Nov 2015

    Successful compiles are priceless; semicolons are cheap. Use semicolons liberally as a prophylactic against compiler errors.

  15. 24 Nov 2015

    Before you settle on a style for your code, don't forget to settle on the style for your style guide!

  16. 24 Nov 2015

    The “Swap” pattern is faster than “Copy-and-Swap” by exactly one copy.

  17. 24 Nov 2015

    In multi-line lists, some put commas at the line end, some at the beginning. Both are wrong. Commas go on a line to themselves.

  18. 23 Nov 2015

    Be ​true to yourself! Unless that leads you to end a line with a `{`, in which case just give up.

Loading seems to be taking a while.

Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

    You may also like

    ·