Commit 89517865 authored by Sadman Kazi's avatar Sadman Kazi 🎸

Add const unless it can't be

parent d0f9dd0f
`const` unless it can't be
==========================
Everything should always be const unless it can't be. This includes both function
parameters as well as functions themselves. This improves readability and self-
documentation of the code. It will also save a lot of headaches and frustrations
when debugging the program(s).
> I am a full const nazi nowadays, and I chide any programmer that doesn’t const
> every variable and parameter that can be. - [John Carmack, 2013](http://kotaku.com/454293019)
On that note, always pass objects as const reference when possible. All of these
would help greatly towards inference of what a function does.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment