3 ms·
I mean following 100% seriously: there is no such thing as factory hell. Even in the few places who do actually overuse factory pattern, it is braindead easy to
by watwut 6y ago
I mean following 100% seriously: there is no such thing as factory hell. Even in the few places who do actually overuse factory pattern, it is braindead easy to figure factories out. It is not like would be something difficult to understand.
The hate for Java is so strongly meme based.
- oriolid 6y agoIt's not difficult, it's tedious and ugly.
- watwut 6y agoUsing factory someone else made is tedious? In what way it is more tedious then using constructor? It is just that thing ... there are patterns that are tedious. The object mapping before hibernate was extremely tedious for example. But factory pattern ... seriously?
- oriolid 6y agoI disagree. Constructor: > Foo f = new Foo(a, b, c); Factory: > FooFactory ff = new FooFactory(); > ff.setA(a); > ff.setB(b); > ff.setC(c); > f = ff.create(); ...or the same in XML. Fluent APIs turn it into oneliner, but it's still good only for adding hours to your bill.
- watwut 6y agoIf this "adding hours to your bill" you need to speed up. And learn IDE of learn type or just watcy other programmers a bit. Cause no one I know spends hours on this. Second, factory methods today have arguments combinations too. fd.create(a, b, c) is the most normal thing in the world. Seriously, this is ridiculous.
- nathell 6y agoWell, I vividly remember reporting this bug against ws-xmlrpc 14 years ago: http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/200709.mbox/%3C200709041848.43136.daniel%40sentivision.com%3E http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/20070... as well as the mental effort it took me to figure this out – by no metric I would call it "braindead easy".