5 comments

[ 2.8 ms ] story [ 24.2 ms ] thread
Are anonymous namespaces really that obscure? They're pretty bog-standard where I work, anyway. Don't think I've ever seen a .cc file more than a couple hundred lines that didn't have one for various helper functions.
Why couldn't C++ use the static keyword here, which is how its done in C, so I expect its supported in C++ as well.
Yeah, I thought anonymous namespaces were pretty standard. It's one of only a few useful ways to hide internals of an object or helper.
I'm sure this article is useful and interesting, but the author lost me at the very first example program, where he wrote `@px++` instead of `(@px)++` (@ stands for asterix character).
> my takeaway is that you have to do something really, really obscure

You used to be able to crash gcc by making the first character of a string literal an 8-bit one.