Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About implicit type conversions..

0 views
Skip to first unread message

Horizon68

unread,
Jun 29, 2019, 3:36:04 PM6/29/19
to
Hello,


About implicit type conversions..

The more implicit type conversions a language supports the weaker its
type system is said to be. C++ supports more implicit conversions than
Ada or Delphi. Implicit conversions allow the compiler to silently
change types, especially in parameters to yet another function call -
for example automatically converting an int into some other object type.
If you accidentally pass an int into that parameter the compiler will
"helpfully" silently create the temporary for you, leaving you perplexed
when things don't work right. Sure we can all say "oh, I'll never make
that mistake", but it only takes one time debugging for hours before one
starts thinking maybe having the compiler tell you about those
conversions is a good idea.


Thank you,
Amine Mopulay Ramdane.
0 new messages