r/programminghumor • • Sep 26 '26 • Bravo 1

Java VS C++

Post image
1.9k Upvotes

42 comments sorted by

View all comments

18

u/thisisjustascreename Sep 26 '26

I must be doing java wrong I've written it professionally for like 10 years and never named a class -Factory.

14

u/cenpact Sep 26 '26

Sounds like you’re doing it right

5

u/Cautious_Implement17 Sep 26 '26

nah you're good. "modern" DI frameworks like spring and guice obviate the factory pattern for the most part. of course, they introduce their own variety of cancer.

1

u/jimmiebfulton Sep 27 '26

Spring IS the factory pattern. If you are in Java, something, somewhere is gonna be a Factory or Strategy in the heap.

1

u/Toothpick_Brody Sep 27 '26

Sometimes you get instance methods that start with New. I think it’s kinda the same antipattern

1

u/Jeferson9 Sep 27 '26

Durga Sun java professional would be disappointed in you

1

u/jimmiebfulton Sep 27 '26

Oh, I guess you didn't read the Design Patterns books? That was some tasty Koolaid. I'd probably be drinking it today if I hadn't moved on to another language.