The complete quote from the book is actually this:
In general, if you have a property called x, including the following line in your implementation section causes the compiler to automatically synthesize a getter method called x and a setter method called setX:.
@synthesize x;
So you need to explicitly use @synthesize if you want the instance variable name to be x. If you
leave out the @synthesize directive, the 'standard' setter, getter and variable names will be used. Which means: variable names starting with an underscore _, as if you would have written:
@synthesize x = _x;
More explanation is in the Mac Developer Documentation (
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html , see under 'Most Properties are Backed by Instance Variables)
Unless you specify otherwise, the synthesized instance variable has the same name as the property, but with an underscore prefix. For a property called firstName, for example, the synthesized instance variable will be called _firstName.
Directly below that in the same document it says (under You can Customize Synthesized Variable Names)
As mentioned earlier, the default behavior for a writeable property is to use an instance variable called _propertyName.
If you wish to use a different name for the instance variable, you need to direct the compiler to synthesize the variable using the following syntax in your implementation:
@implementation YourClass
@synthesize propertyName = instanceVariableName;
...
@end
Admittingly, the case of what happens when you use
@synthesize propertyName without the = is not discussed explicitly there.
In your code, you could for instance use
NSLog(@"%i,%i", self.numerator, self.denominator)
Sorry, a quite lengthy response... hope it helps!