LineReader icon indicating copy to clipboard operation
LineReader copied to clipboard

Naming of things

Open levous opened this issue 13 years ago • 1 comments

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.

levous avatar Jun 02 '11 13:06 levous

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.

johnjohndoe avatar Jun 02 '11 13:06 johnjohndoe