The basic manual memory principle of passing buffers to procedures to keep memory management as exterior in the call-stack as possible obviously makes a lot of sense on the face.
But considering the ease at which I can pass any allocator to any procedure, should I just embrace internal allocation? It would make a lot of design much simpler as I can just allow deeply nested procedure calls allocate whatever they need and clean it all up on the outside as soon as those returned allocations aren’t needed.
I’ve been trying to plan upfront what buffers will be needed for procedures and allocating and giving it to them rather than letting the procedures allocate - I guess there is still value in doing this just to make it explicit when memory is being allocated rather than hidden internal allocations, but who hecking cares when I can easily test for leaks anyways?
Is anyone going to stop me? (Jokes aside, I’m open to arguments against this style).