Decide on consistent naming for Base/Abstract classes
mscroggs opened this issue · comments
Currently, the base class for finite element is called FiniteElementBase
while the base class for cells is called AbstractCell
.
We should decide on a consistent naming for base classes. I'm in favour of the ObjectNameBase
but am open to better opinions.
FooBase
to me tends to suggest a concrete class that provides implementation for which one must call __init__
, whereas AbstractFoo
suggests an interface that a subclass must conform to (and therefore one doesn't need to call __init__
). In #168 you're making an interface, so I think AbstractCell
is right.
FiniteElementBase
at the moment is in a superposition between these two states. It is kind of an interface, but requires that its subclasses set up the superclass appropriately (which some subclasses don't do and have to hack around). This has caused a bunch of pain in the past which I'm sure you are aware of! I think (although it's been a while since I looked concretely here) that the FiniteElementBase
object should be an interface
with no implementation and therefore by my internal guidelines would be named AbstractFiniteElement
.
FiniteElementBase
at the moment is in a superposition between these two states. It is kind of an interface, but requires that its subclasses set up the superclass appropriately (which some subclasses don't do and have to hack around). This has caused a bunch of pain in the past which I'm sure you are aware of! I think (although it's been a while since I looked concretely here) that theFiniteElementBase
object should be aninterface
with no implementation and therefore by my internal guidelines would be namedAbstractFiniteElement
.
I'm working towards removing the __init__
from FiniteElementBase
and making it more like an interface. I think it makes sense to then rename it AbstractFiniteElement
.