Questions tagged [boxing]
Boxing is the process of placing a primitive type within an object so that the primitive can be used as a reference object.
5 questions
7 votes
2 answers
819 views
Generic request processing
I got a webservice that accepts multiple calls that require different handling and validation, using generics I've managed to create a common class that accepts a handler and a validator and it looks ...
4 votes
6 answers
1k views
Do you have to have boxing of primitives in OO language?
Is boxing of primitives required in OO languages to keep them consistent with the rest of the object system (generics etc.)? Or is it avoidable - is it possible to avoid any additional performance ...
0 votes
2 answers
686 views
Is it acceptable to use C11 generic macros in Objective-C to box numbers?
I was getting tired of repeating types when writing things like this: NSDictionary* d = @{@"so": [NSNumber numberWithInt:index]), @"much": [NSNumber numberWithBool:accepted]), ...