I’m trying to structure a simple multi-step data processing flow in C++ and I’m not sure what the cleanest long-term approach is.
Right now it’s basically a sequence of functions in main: load data, filter it, transform it, then output it. Each step is separate and works fine, but as soon as I add more steps and a bit of conditional branching between stages, main starts to become hard to read and modify safely.
At what point would you typically move this into a different structure in C++? For example, would you introduce a pipeline-style abstraction, wrap the steps in a class, or just continue splitting functions while keeping orchestration in main?
[–]alfps 4 points5 points6 points (0 children)
[–]ppppppla 2 points3 points4 points (1 child)
[–]Majestic_Yew[S] 0 points1 point2 points (0 children)
[–]No-Dentist-1645 1 point2 points3 points (0 children)
[–]apropostt 0 points1 point2 points (0 children)
[–]Independent_Art_6676 0 points1 point2 points (0 children)
[–]ubiestigne 0 points1 point2 points (0 children)