4 ms·
This is funny because no one uses the factory pattern in other languages
by spacemanmatt 6y ago
This is funny because no one uses the factory pattern in other languages
- isoprophlex 6y agoYou'd be surprised to see how many WhateverFactory classes there are in the current python project I'm working on... sigh.
- number6 6y agoUsing FactoryBoy for testing?
- sheikheddy 6y agoSadly I've seen it used in Scala
- marcosdumay 6y agoWell, to a first approximation, no, nobody uses the factory pattern in other languages. Once in a long while you see one in C# or C++. But the people making fun of Java aren't comparing it with C# and C++.
- spacemanmatt 6y agoI used C/C++ for years, and I just don't believe that the world+dog quit creational design patterns. It was just now very easy to find a database connection pool for C++ that is exactly a connection factory. Would you mind clarifying your comment that almost nobody uses factory patterns in other languages with some sense of exactness as to what is and what isn't a factory?
- marco_craveiro 6y agoReminds me of the old FactoryFactoryFactory joke [1] [1] https://gist.github.com/nkbt/4691b1ae3e78a6141aea https://gist.github.com/nkbt/4691b1ae3e78a6141aea
- imglorp 6y ago> "This thing comes with documentation, right?" This is the most painful part for me. If you're trying to understand some code written in Gratuitous Object Astronautics style, it's almost universally assumed you're fully aware of why the product contains hammer factory factory factories, how factories work, and how get an actual hammer to swing. The Gratuitous Object Astronautics culture is so accustomed to all the nonfunctional boilerplate that skilled, self-gratifying, astronauts never need to document their cleverness. This leaves casual tourists in the dark, which is a problem in any organization.
- spacemanmatt 6y agoAlso reminds me of the self-effacing response to nomenclature criticism in Java: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...