nlehuen 1 day ago

Not to worry, there is a 278 page book about initialization in C++!

https://leanpub.com/cppinitbook

(I don't know whether it's good or not, I just find it fascinating that it exists)

4
bhk 1 day ago

Wow! Exhibit 1 for the prosecution.

kazinator 1 day ago

C++ doesn't have initiation hazing rituals, but initialization hazing rituals. (One of which is that book.)

codr7 1 day ago

That's what I've been saying, every line of C++ is a book waiting to be written.

nitrogen99 1 day ago

Well, authors are incentivized into writing long books. Having said that it obviously doesn't take away the fact that C++ init is indeed bonkers.

harry8 1 day ago

What would be the incentive for making this a long book? Couldn't be money.

jcelerier 1 day ago

It is actually. It's been shown that longer books make more sales as they are considered more trustworthy, so authors are incentivized to artificially drag them longer than they actually require

harry8 1 day ago

Ever written one? How much did you make?

bluGill 1 day ago

The money isn't from book sales. The money is you can charge higher consultant fees because "you wrote the book". If you don't play the game of course you won't make money, but writing a book is one step. (the full game has lots of different paths, there are other ways to make a lot of money without writing a book)

Analemma_ 1 day ago

I imagine if I'd managed to actually memorize all of C++'s initialization rules, I'd probably have to write a book too just to get it all out, or I'd lose my sanity.

sph 1 day ago

Then you can proudly put “C++ initialization consultant” on your resumé and get paid $1000 a day fixing class constructors at Fortune 500 companies.

codr7 1 day ago

There are no limits to how much of an specialized expert you can become in C++.

Knowing all of it just isn't possible from my experience.

nitwit005 1 day ago

Imagine you're in a world where magazines are dead, but books are still a thing, and stores won't stock a thin book.