[swift-users] Coding style for internal/private variables
2th at gmx.de
Wed Jun 1 11:23:45 CDT 2016
I never liked the underscores (so for me, they have been the best choice to mark stuff I should not know of in Cocoa ;-).
For several years, I prefixed instance variables with "m", but stopped doing so after a talk about bad habits in writing Java code:
It is like Hungarian notation, which also puts redundant information into names — and if even Java-folks think it's anachronistic… ;-)
Objective-C lacked some features that Swift has, so workarounds had been created; but those shouldn't be carried over (by the way: It's similar with file names and those extensions, and a modern file system for OS X is years overdue ;-)
More information about the swift-users