epreston/PSModelViewer — Issue #1: Post-fix member variables in classes
Author: epreston
Created: 2011-10-09 17:42:59+00:00
State: open

It was recommended in best practices to use post-fix under bar "_" for private member variables in classes. Most Apple framework code uses the prefix under bar. Many other code bases use the postfix under bar. Member variables are postfixed to make it clear when the member variable is being manipulated directly vs. via an accessor method of the same or similar name.

Benefits:

This will avoid the rare occurrence of a name clash and future proof the code. Make it clear when ivars are being used directly because accessors often have the same name with no prefix or suffix.

Category: Coding standards.

Milestone: Code Review