Programing style review
Hi comp folks .....
Everyone who have some sort of coding style might find this interesting.
Coding fundas -
1. Follow the single-entry/single-exit rule. Never write multiple return statements in the same function.
2. Never, ever, EVER return references to local objects.
3. Prefer preincrement, avoid postincrement.
4. Prefer passing const& instead of copied values.
5. Watch out for hidden temporaries created by parameter conversions. One good way to avoid this is to make ctors explicit when possible.
read more on Guru of the week.
Bye for now....
Al

No comments:
Post a Comment