Re:Java garbage collection can be really slow
by anonymousab on Saturday April 23, 2016 @02:23PM
(#11556693)
As with most language jokes/prejudices, I think the hate comes from seeing the misguided, incorrect or unnecessary uses of that pattern.
Java's prominence in the corporate world means sturgeon's law is more apparent.
Re:Java garbage collection can be really slow
by exception_e on Saturday April 23, 2016 @02:25PM
(#11556700)
Never heard of that law. Brilliant.
Wikipedia says it best: "[The] Factory pattern deals with the instantiation of object without exposing the instantiation logic."
Practical benefits:
- Can help rid of excessive switch and if/elseif statements and splits up your logic
- Eliminates new keyword to improve testability