RecordNamedProperty or Vector + Enum + dynamic extras is not appropriate for data structures known at compile time
- Dominant language
- C++
- Stars
- 403
- Forks
- 154
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 82
Description
**Is your feature request related to a problem? Please describe.**
`RecordNameProperty` is a sort of replacement for std::map with odd semantics (put kinda required to establish valid state, reset, holds onto a raw outsream pointer, has Name value pairs but is accessed through indexes...).
Vectors + Enums of indexes + Extra indexs + vectors of string names are used where a struct for the invariant values + a std::map would make more sense.
The end result is to complicate the handling and debugging of important data in many places to simplify MPI transfers happen seldom both in execution and the source code.
**Describe the solution you'd like**
Use native C++ structures/types for data members to result in objects easy to read and reason about. Nothing should be runtime dynamic that is easily known and invariant at compile time.
isolate MPI marshaling concerns, serializing data for transfer is unlikely to be the bottleneck, if necessary reuse a pool of memory for transfer. Do not force data into an MPI convenient layout at the cost of readable and clean code.
Output handling should be done by output functions that either read the appropriate members of the object or take the values to be output as arguments.
**Describe alternatives you've considered**
In `EstimatorManagerNew` there is still a good bit of this design pattern left and it made porting harder and makes further development more difficult. I wish I'd removed it already.
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.