Not sure why Objective-C decided to use NSNumber instead of float, double, etc. How is this type represented on disk?
Not sure why Objective-C decided to use NSNumber instead of float, double, etc. How
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.
NSNumberis toll-free bridged withCFNumber. In recent implementations of Core Foundation,CFNumberis a tagged pointer. This lets it be treated as an object, but without all the overhead of an object. Instead, the value is encoded in the object pointer (and isn’t actually a pointer).See Tagged pointers and fast-pathed CFNumber integers in Lion.