YAAQ Yet another academic question - overloaded or "strongly typed"?
-
Overheard many years ago that "C is strongly typed language". So what's up with unspecified / unknown "standard definition " of int abs (int) overloaded by , again unknown source "standard", to float abs ( float)? Is it just "progress" AKA from plain C to C "whatever is latest derivative of it" or just plain lack of real standards ? Happy coding in 2015 Cheers Vaclav
-
Overheard many years ago that "C is strongly typed language". So what's up with unspecified / unknown "standard definition " of int abs (int) overloaded by , again unknown source "standard", to float abs ( float)? Is it just "progress" AKA from plain C to C "whatever is latest derivative of it" or just plain lack of real standards ? Happy coding in 2015 Cheers Vaclav
That's not C, it's C++; see the Remarks section at http://msdn.microsoft.com/en-us/library/kw1ee768.aspx[^] and http://msdn.microsoft.com/en-us/library/18z15bk0.aspx[^].
-
That's not C, it's C++; see the Remarks section at http://msdn.microsoft.com/en-us/library/kw1ee768.aspx[^] and http://msdn.microsoft.com/en-us/library/18z15bk0.aspx[^].
-
Sorry I did not specifically say "C++". I should have said "is C++ ( and derivatives ) strongly typed " to make the question clearer. Maybe the question is just irrelevant with overloading, thus academic as I said in title. Cheers Vaclav
-
Sorry I did not specifically say "C++". I should have said "is C++ ( and derivatives ) strongly typed " to make the question clearer. Maybe the question is just irrelevant with overloading, thus academic as I said in title. Cheers Vaclav
I should have said "is C++ ( and derivatives ) strongly typed " No need. You just mixed concepts when including overloading - that's like comparing apples with the act of driving a car. :-) So restricting the question to C, it is indeed a strongly typed language, but in some instances not entirely strict about it. C++ is stricter. For further reading, see f.ex. this wikipedia page.