This work discusses the challenges faced by the cosmological simulation code gadget under the prospect of future development. A new data structures engine
based on C++17 standard is proposed to allow better code modularity leading to significant simplification in developing new features or redesigning the existing ones. The major part of the new construct is based on compile-time programming and thus no run-time penalties are incurred by employing high-level language features.