3.02.2011

Stunned

I'm kind of stunned how smartly my compiler (or the C++ standard in general, no idea what's "causing" the effect) can decide between overloaded parameters with thing's like T& and T* if T is always a pointer. I know, I know - that would result in something like int*& and int*, but it's amazing that it works and that it's decidable (though it's pointless in the case I'm using it cause using a "+" operator on pointers isn't allowed in C/C++). Sometimes I amazed by such simple, systematic decisions. I don't know why, but it indicates that it's some kind of dark magic to me. Something I can easily overlook or misinterpret, leading to strange errors I can't correctly unless I take a look at what my should do and what he actually does or something like that. I'd simply use them as if they were a natural part of my language, but deep inside it's something more general that works recursively, with much more depth than visible and understandable from the outside. The magic of recursion and generalization never stop do amaze me, wholeheartedly.

No comments: