Distinction between a "strictly typed function" and a "not strictly typed function"?

57 Views Asked by At

Let $f$ be the identity function for the real numbers.

In the vernacular, we'd say that $f$ is a function from reals to reals, or that $f:\mathbb{R}\to \mathbb{R}$.

Let $g$ be the inclusion map from the reals to the complex numbers. In the vernacular, we'd say that $g$ maps the reals to the complex numbers.

Now, in certain cases, as far as I can tell, it is useful to say that $f = g$. In fact, in set theory, they'd be the same object. However, in others, it is useful to consider $f$ and $g$ different objects -- after all, $f:\mathrm{Real}\to \mathrm{Real}$, and $g:\mathrm{Real}\to \mathrm{Complex}$ (which occurs a lot in programming languages with a richer typing system).

I'm not trying to argue which is better here, but is there a name for the distinction between these two different treatments of functions?