Would appreciate any guidance or views on the question of application ‘composition’. Let me try to give an example…
Typically when I am developing a Go application (though I tended to do this in Java too), I’ll set up separate ,go files for functions, structs and methods, parameters and so on. Then, from main I’ll kick something off, usually the first sequence of actions which seem logical to me. So from main I might kick off calls to a function which results in calls to, say, five other functions then … inevitably… I’m back in main.
Then from main I’ll kick off the next sequence which structurally and compositionally is like the first… then I’m back in main again… and so on.
Is this a bad thing? Should I design my execution flow to prevent continually falling back to main? Or is that okay?
How would a Go Pro do it?
Thanks!