Merge pull request #40 from jonathandturner/patch-1

Moving link to the key part of the sentence
This commit is contained in:
Jason Turner
2015-08-25 11:27:31 -06:00

View File

@@ -2,7 +2,7 @@
## Const as Much as Possible ## Const as Much as Possible
`const` tells the compiler that a variable or method is immutable. This helps the compiler optimize the code and helps the developer know if a function has a side effect. Also, using `const &` prevents the compiler from copying data unnecessarily. [Here](http://kotaku.com/454293019) are some comments on `const` from John Carmack. `const` tells the compiler that a variable or method is immutable. This helps the compiler optimize the code and helps the developer know if a function has a side effect. Also, using `const &` prevents the compiler from copying data unnecessarily. The [comments on `const` from John Carmack](http://kotaku.com/454293019) are also a good read.
```cpp ```cpp
// Bad Idea // Bad Idea