Storing numbers: primitive or object?
By patter at Mon, Nov 16 2009 6:53am |
I'm packing up some code that I'll be using regularly into a Framework. I'm just wondering:
Should I be using primitives or NSNumber to store the numbers in the objects?
Primitives look easier and make the mathematics easy to read, but will I be able to use bindings to GUI objects if I use them?



Use primitives
Generally I would stick with primitives unless you have a good reason not to. You can use bindings directly with primitives, so need to switch for that reason.