January 26th, 2011


Rest strokes with i/m/a along with free strokes on bass

Оказывается, можно делать и такое:

Играть с опорой верхний голос, и одновременно басс. Очень красиво получается!

On a side note: уже второе доказательство, что гитаристы дёргают струны неодновременно осознанно, типа, "Segovia trick". Рррррр. (Хочется задушить кого-нибудь по этому поводу...)

Implementation in C++ headers

Can you name possible problems of having implementation in headers?

I can see the following:

1. Includes may be wrapped with different pragmas that may affect compilation and make structures incompatible (e.g. different #pragma pack).

2. IDE may not insert int 3s in the right places when debugging - breakpoint may not always fire, even in debug mode with no inlining.

3. If you put method pointers into a list and rely on pointer comparison for business logic (e.g. dedup or removal), this can be screwed up.

I am trying to think if there are any other cases. (Anything with class inheritance/VMT/dynamic casts/type checks? Anything you've debugged that had root cause of having implementation in headers? :))


4. In case of DLL, the code might get to client library instead and cause version problems.

5. Compilation speed! Code in headers will cause slow down.