Boxing is the process of placing a primitive type within an object so that the primitive can be used as a reference object.

learn more… | top users | synonyms

3
votes
0answers
95 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 ...
1
vote
4answers
2k views

When to not use dynamic in C# [closed]

I'm making a class similar to the following: public class KeyValue { public readonly string key; public readonly object value; } Value could be of any object type as a result of this design....
4
votes
6answers
554 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 ...
5
votes
2answers
351 views

Is there a name for the number of values a variable can take? [closed]

For example, a bit or a boolean can be either 0 or 1 so the number 2 is associated with it. Similarly, for a byte which is 8 bits, the maximum number of different assignments would be 2^8. Is there a ...
0
votes
2answers
321 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]), ...