Naming of things #3

Open
levous opened this Issue Jun 2, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@levous
Contributor

levous commented Jun 2, 2011

While it uglifies the code, it is best practice to prefix both class names and any category methods with some uniquish characters. JJD would be appropriate. Without namespaces in Cocoa, this provides a level of protection against collision if another set of source code. or a library or framework, also defines a similar thing called FileReader or implements a similarly named category method on NSData.

Cocoa will happily pick one, and it might not be the one you want, even if you omit the header files for colliding names.

@johnjohndoe

This comment has been minimized.

Show comment Hide comment
@johnjohndoe

johnjohndoe Jun 2, 2011

Owner

Hi Rusty. I did not plan to create the LineReader classes as a framework. Therefore, I left out the prefix. I know it is best practice with modules or frameworks. I maybe find time next week to refactor the classes.

Owner

johnjohndoe commented Jun 2, 2011

Hi Rusty. I did not plan to create the LineReader classes as a framework. Therefore, I left out the prefix. I know it is best practice with modules or frameworks. I maybe find time next week to refactor the classes.

@ghost ghost assigned johnjohndoe Jun 2, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment