3 ms·
"Is there an agreed name for this pattern?" I wouldn't know, but some Dylan book taught me that, along the abstract-concrete dimension, there are not two, but
by Someone 9y ago
"Is there an agreed name for this pattern?"
I wouldn't know, but some Dylan book taught me that, along the abstract-concrete dimension, there are not two, but three kinds of classes:
- concrete, instantiable
- abstract, instantiable
- abstract, not instantiable
where a type <foo> is instantiable if a function make(<foo>) exists (because <foo> is abstract, that function must return an instance of a subclass of <foo>)
That factory function makes your abstract class instantiable.
Also, in Java, Foo would be an interface, and that factory would be a FooFactory.