What are you talking about? At least in Java and PHP you can absolutely declare constructor and function parameters as interfaces. As you say that’s exactly what they’re for.
Yeah that’s my point, I don’t see a use for factories here, because it’s possible to just use generic parameters (whether it’s constructors or function arguments).
What are you talking about? At least in Java and PHP you can absolutely declare constructor and function parameters as interfaces. As you say that’s exactly what they’re for.
Yeah that’s my point, I don’t see a use for factories here, because it’s possible to just use generic parameters (whether it’s constructors or function arguments).