4 ms·
> No, implicit conversion is a deliberate C++ feature and no analog existed in C No. > it's not a C choice, it's not about "compatibility". One of the design
by monkeyelite 1y ago
> No, implicit conversion is a deliberate C++ feature and no analog existed in C
No.
> it's not a C choice, it's not about "compatibility".
One of the design of C++ classes is that you can create a class as powerful as int - you can’t do that without implicit conversion.
- tialaramex 1y agoIt would have been perfectly possible - not to mention obviously better - to make people actually write what they meant when defining the new type and this has no impact on the dubious priority of being able to make your own int type by gifiting your type implicit conversions in use if that's what you want which it often is not. This is just another thing on the deep pile of wrong defaults in C++.
- monkeyelite 1y agoYes, it’s a wrong default problem.