Are you a C++ programmer who works with Python programmers? Are you fed up with them banging on about their “Python Philosophy”? Do you feel like beating them over the head with your compiler every time they witter on about using 4 space intending? Does the fact they continuously try to convince you enforced white space syntax is a good thing just make you want to hurl chunks? If so, what you need is “The Zen Of C++”!
The Zen of C++:
- Beauty is but skin deep.
- Explicit is implicit.
- Why be simple when we can use meta-templates?
- Complex is better when more complicated.
- Nested is fun but tail end recursion rocks.
- C++ is better than Python.
- Readability counts for nothing.
- Special cases aren’t special enough if they don’t break the rules.
- Forget practicality; you’re an artist so let your creativity flow.
- Errors can be ignored; that’s what default exception handlers are for.
- Supress all compiler warnings — you know best!
- In the face of ambiguity, resort to templates.
- There should be one– and preferably only one –obvious way to do it; but don’t let that stop you inventing others.
- Although that way may not be obvious, which clearly means a better way exists (probably using lots of templates).
- Now is the best time to introduce unnecessary complex constructs otherwise you may never get around to it.
- Never is often better than right now, unless it’s that “one last ‘quick’ change that you know will not cause a defect.
- If the implementation is hard to explain, good — you’ll have job security.
- If the implementation is easy to explain start working on your CV.
- Namespaces are one honking great idea — it means we can now dump everything in the global one!
The Zen of C++, which was (mostly) Inspired by The Zen of Python and written with my tongue firmly in cheek!