> making primitives full objects is the right design and has nothing to do > with bloat which just means the implementation sucks. > > consider: > > struct Integer(int bits, signed = true) {...} > with specializations for 8, 16, 32, 64 > > Integer!(32) will have the same size as an int since structs don't have > vtables in D. > > of course, for this to be truly useful the compiler needs to understand > "123.methodName()" kind of code.
And I'm guessing you didn't mean auto-boxing either?