Can we say that “C language operators are polymorphic” ?
For example if
int a, b;
float p, q;
a+b;
a+p;
p+q;
etc will generate different code when assembled, as the type conversion is needed the floating point coprocessor instruction needs to be executed to make the conversion and the floating point additions. So the operators operate differently depending on the objects they act upon.
Although these are implicit so if this can theoretically be called static polymorphism, operator overloading?
If we consider the operator
+a function, then it matches the definition of a polymorphic function because it can “evaluate to or be applied to values of different types”. So yes, it’s a polymorphic function.