Elliotte Rusty Harold's take on Java
Justin Johansson
procode at adam-dott-com.au
Thu Sep 17 06:15:05 PDT 2009
> 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?
More information about the Digitalmars-d
mailing list