[Python-3000] Kill "generic functions"!

Antoine Pitrou solipsis at pitrou.net
Fri Apr 7 00:52:44 CEST 2006


Le jeudi 06 avril 2006 à 13:33 -0700, Guido van Rossum a écrit :
> I think that the solution to this would be a book or course "Python
> for Java programmers". Not using the most natural name for a feature
> because Java programmers might misunderstand it sound like the wrong
> motivation.
> 
> Plus, the syntax for using overloaded functions/methods is
> sufficiently verbose that the elegance of using default argument
> values is hard to miss.

<unlurking>

But overloaded methods as they exist now have exactly the same
expression as non-overloaded methods, all the machinery (mro walking
etc.) being hidden from the programmer.

On the contrary, this new "overloaded function" mechanism requires the
explicit use of a special decorator to specify that the function can be
overloaded, and another special decorator to specify that we are
currently overloading a function. Thus you would be referring to two
different programming schemes with the same word. It's confusing IMO.

</unlurking>





More information about the Python-3000 mailing list