Since “id” is a keyword in Objective-C what alternative name do you use for ID variable (e.g. PK field)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think it should be noted that the compiler can distinguish between
idin the type specifier position andidin the variable name position. That is,will compile just fine (as, indeed, will
id id; id = [NSNumber numberWithInt:10];). (You could also uppercase it:ID.) That said, those are all horrible ideas. Don’t use them. Forget I even said that.The style in Cocoa programming is to tend towards verbosity, so (as all the earlier answers have suggested) the best practice is probably to write it all out:
identifierordinglehopferID.