What kind of naming convention (if any) do we want for these top level abstract classes? #1555
TotoGaz
started this conversation in
Infrastructure
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
PR #1418 implements an abstract base class (hence the
ABC)CellBlockManagerABCon top of all the hierarchy.Same for
CellBlockABC. ThoseABCclasses are meant to describe the concept for the client code.This trailing
ABCdoes not exist yet inGEOSX.When working at this refactoring, I used it as a reminder for myself.
The question is “What kind of naming convention (if any) do we want for these top level abstract classes?”
In GEOSX we currently have
Basesuffix convention to indicate that we have something on top of a hierarchy.But quite often also this
Baseis meant to share/factorize code for the derived classes. (Which should not be the case forABCclasses).And one may finish exposing too much: we may have to expose some factorized pre-computational method (or maybe simply a setter) that would not fit another context.
The idea of the
ABCis to offer the contract and only the contract.So how do we want to call these
ABCclasses. There are multiple options.ABCfor abstractions, keepBaseon centralized implementations.ABC, useBaseon top instead. (CellBlockManagerABCbecomesCellBlockManagerBase)ABC, use nothing instead.CellBlockManagerABCwould becomeCellBlockManager, the derived implementations will have to find some descriptive name (can beBase?)namespace api(e.g.geosx::api::CellBlockManager) for the contracts.Personally, I’m not too much in favor having devs manipulating
Baseclasses.Consider
EventBase: devs manipulate a bunch ofevents, noteventBases. And we have anEventManager, not anEventBaseManager.Beta Was this translation helpful? Give feedback.
All reactions