monkeyelite 1 day ago

> There is often value in putting a class in a struct.

And what’s the cost?

Note that a reference to a class is still POD. It just doesn’t have ownership.

Also I’m not making a specific policy proposal. Im identifying constructors and destructors as the source of complexity. What should we do about it?

> and force people to think about POD or not

No such thing as feature you don’t have to understand. The reason this article exists is that C++ programmers must deal with complex initialization behavior.

Can a C++ programmer not understand move semantics? Or copy constructors?

1
bluGill 1 day ago

Most of the time the cost is not worth worrying about.

Most of the time you don't need to think about move or copy - the compiler does the right thing for you. When there are exceptions it is generally when you need to disable them which is simple enough. When you think about constructors you only need to think about the local class in general, and not how they interact with the larger world.

constructors and destructors eliminate a lot more complexity than they solve. They enable RAII and thus clear ownership of everything (not just memory!).

monkeyelite 13 hours ago

Sounds like C++ has everything you want and is just the right amount of complexity for you.

bluGill 5 hours ago

Every version of c++ has added something I want and overall makes the language better. backward compatibility means I can start using the new stuff without rewritting the old and so I can take advantage of it now. (At least somewhat - calling old APIs is weird)