Re:Java autoboxing/unboxing madness (2007)
by tsotha on Thursday September 03, 2015 @10:18PM
(#10168522)
>They should have killed the primitive/object distinction, turning the primitives into stack-allocated objects and rewritten the collections libraries.
That would have been a mistake, because it would have made Java unreasonably inefficient for manipulating large data sets. You really need both, which is why they included both originally.
Autoboxing is a problem in that it allows you to pretend you don't have to check for nulls when you really should be checking for nulls. If I had my druthers I'd forbid autoboxing on my projects.
That would have been a mistake, because it would have made Java unreasonably inefficient for manipulating large data sets. You really need both, which is why they included both originally.
Autoboxing is a problem in that it allows you to pretend you don't have to check for nulls when you really should be checking for nulls. If I had my druthers I'd forbid autoboxing on my projects.