Gabriel Dos Reis <[EMAIL PROTECTED]> wrote: >>> IMO, if these are C++-only, it's relatively easy to deprecate these >>> extension -- but I'd like to hear from Jason and Nathan, and also the >>> user community before we do that. Of all the extensions we've had, this >>> one really hasn't been that problematic. >> >> I would prefer them to stay. My reasons: >> >> 1) std::min() and std::max() are not exact replacements. For instance, you >> cannot do std::min(3, 4.0f) because the arguments are of different type. > > That is a rather weak argument. What is the type of the argument if > it were possible?
"float" of course, like we do for 3 + 4.0f. > If float, why can't you write 3f? If int, why can't > you write 4? Because the example was just an example. In real code, "3" is probably a variable of integer type, and "4.0f" is probably a variable of floating point type. Going on this way, why don't we to propose to deprecate "+" in C++ because std::plus can be used as a replacement? I'm sure people won't be happy to be unable to add an integer and a long. > With the ominpresence of function templates and the > rather picky template-argument deduction process, how useful is that > fuzzy-typed constructs with rather dubious semantics and implementation? It is useful for me. It has been many times. It avoided me to write casts which are otherwise necessary. I don't think I will have to explain you the domain of the problem, why that single variable was float or int, and so on. My statement is that std::min() is *not* an exact replacement for <?. This is undebatable, and stating otherwise is a lie. The fact that you find the differences useless and I find them useful is immaterial. There will always be differences on which features of the language different users take advantage of. > I would like to see those extensions deprecated and go with no return. I would like to propose them for standardization. It is just too bad I don't have time to prepare the papers. -- Giovanni Bajo