c3sr / pangolin

6 stars 0 forks source link

Consider c++ Mixin-stype for augmented data structures #42

Open cwpearson opened 5 years ago

cwpearson commented 5 years ago

For example:

cwpearson commented 5 years ago

I think most of our code would need to modify what happens during construction of the object, i.e., it would need to do all the original construction operations, plus some additional ones.

The mixin could not replace the constructor, because then it could only be mixed with the base class. It would be possible for the mixin to defer to the base constructor and then run its own initialization, but that part would have to wait until the entire graph was read in instead of being able to overlap it with I/O.