3.09.2011

Good idea

So, after a day of completely NOT programming-related activities (I just too much of this stuff lately...) I feel refreshed and clear in mind, it's great to completely shuft completely off from time to time (I like the term "brain afk" for some reason). I realised than my operator system is also an almost perfect solution for all the usually iterator-based memory concepts. Provided can create, access and delete single elements by a basic storage class, one should be able to use this operator system for EVERY set with n elements. Even better, you provide a set of functions to work on a single, serial or whatever else sequence, taking an operator to apply. This makes things more interesting, it'd a possibly "equal" (though only in a statical sense) version of what STL's iterators/container can do. Yeah, I think I've finally found what I was trying to archieve in the past and up to present. It's a good feel of having a cool solution for stuff like that. It's of course still more complicated to write, but enables you to really do a lot of different things with theoretically equal performance as if you'd write it all directly. So far I've finished all basic operators, so I can move on experimenting with them for all kinds of class. In theory, I could apply it to everything that stores more than 1 elements - vectors (the mathematical one), arrays, lists, bitsets, trees... whatever stuff, I just need to write a set covering template functions with the basic input types and then the user is free to insert whatever operator he wants. I'll apply to all related classes I've finished so far and see what other basic operators other than the standard ones could be useful. Things like power-of-two sums or so would a matter of calling a sum functions and passing you power operator. Or power series in general (it's just great example of iterative formulas), simply made easy. Oh and it'd be also MUCH easier to create all my previous planned mathematical formulas for approximation AND linking them to a memoization array! Wow, that's quite a fucking thing. Shit yeah, this eases my rather visionary ideas to no end, except for fact that it's just not as comftable to write. But well, better a consistent and simply interface giving you all freedom to combine instead of an overloaded, but limited monster. I also prefer the module-like technologies, they tend to blend so much... smoother. And less hard to nurture.

No comments: