4 ms·
Is Java still lacking constructs like var thingy = FactoryFactoryObjectThingymybobProducer The compiler actually knows what type is on the right of the =
by acqq 13y ago
Is Java still lacking constructs like
var thingy = FactoryFactoryObjectThingymybobProducer
The compiler actually knows what type is on the right of the = sign. Having to write FactoryFactoryObjectThingymybobProducer is not
good for anything.
- rld 13y agoUsually this is not what you want to separate interfaces from implementations. For example, this: List<T> l = new ArrayList<T>(); is preferred to this: ArrayList<T> l = new ArrayList<T>(); Of course, it would be nice for the compiler to assume the latter if no type is specified on the left side.