Did it

I'm quite sleepy right now, but I think I did it. I designed a rather simple macro setup for a bunch of loops that either have an expression-based version evaluating into a FOR loop header with custom code following after or in a BEGIN/END-style version for instruction-based variants. It's all very open and you can pass whatever arguments you want to your macros using complete argument lists. I even managed to generalize my beloved XDIM macro for virtual endless levels simulated nested loops, so I can utilize so a greater extent, too. However, this macros has a limitation within which you can only use one array or pointer as an iteration argument. Can't do this differently if I still want to have a dynamic number of nesting levels, but I'm already working on statically leveled loop nesting using new set of variable argument macros.

Wow, I didn't think just generalizing loop before. I mean all I had in mind was this annoying OOP iterator concept which never really turned me on (figuratively speaking). But inserting loops fill exactly the gap I need which's also very inconvenient to reach via OOP concept due to non-local location of loop code.

So I yeah, I'm almost done with this and I think have to rework a lot of code using these macros. They are so atomic and simple, I don't think that I'll need more or them in the future. Or atleast I don't think that they will be any different.

No comments: