epreston/PSArborTouch — Issue #1: Post-fix private member variables in classes
Author: epreston
Created: 2011-10-09 13:40:20+00:00
State: open
Labels: Improvements

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: Library Code Review