News for hackers. Stuff that matters.
Re:Java garbage collection can be really slow by exception_e on Saturday April 23, 2016 @12:29PM (#11556191)
That factory code you mentioned isn't _just_ a Java thing, but a very well-known and wonderful design pattern.

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

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.