Write explicit constructors - but what about assignment?
Implicit conversions considered harmful.
Okay, this might be a little harsh:
Potentially dangerous and/or expensive implicit conversions considered harmful.
Better.
Implicit conversions will happen “accidentally” by their very nature, so if they happen, they should always do the right thing.
And how to prevent implicit conversions?
Simple: use an explicit
constructor.
But that’s only half of the problem: What about assignment?
Is there explicit
assignment?
If so, when do I use it?