Ian Lance Taylor wrote:
Richard Guenther <richard.guent...@gmail.com> writes:
I agree that that is the usual problem with overloaded operators. I don't really agree that that is a problem in this specific case. We have to do those operations anyhow. I don't think the ease of writing the code is going to cause us to do extra operations in the target floating point format.
I agree that judicious use of overloading of arithmetic operators is a big syntactic convenience that does not have any downside. For an example, look at the definitions of "+" etc for universal reals and universal integers in the Ada front end.
Ian