Favorite non-python language trick?

D H d at e.f
Fri Jun 24 16:51:05 EDT 2005


Terry Reedy wrote:
> "D H" <d at e.f> wrote in message
> 
> 
>>Roy Smith wrote:
> 
> 
>>>Tom Anderson  <twic at urchin.earth.li> wrote:
>>>
>>>>The one thing i really do miss is method overloading by parameter
>>>>type.  I used this all the time in java
> 
> 
>>>You do things like that in type-bondage languages like Java and C++
>>>because you have to.  Can you give an example of where you miss it in
>>>Python?
>>
>>Well it's coming to a future Python version,
> 
> 
> The 'it' under discussion is 'method overloading by parameter type'.  While 
> a few people have requested it, I have seen no indication that 'it' is 
> coming. 

Did you not see the very next sentence I wrote which exactly clarified 
my point that I was referring to type checking and not method 
overloading?  Way to quote me out of context.  Type checking IS coming 
to python in all likelihood ->

 >>I don't know if you'll have method overloading, but there will be type
 >>checking.


 >>"Type checking is going to slow down your code." -GVR 2005 keynote,
 >>http://www.sauria.com/%7Etwl/conferences/pycon2005/20050324/The%20State%20of%20Python.html
 >
 >
 > You left out "    NOTE: Nothing's settled yet!!!!!!!!!!!!!!!!" and "
 > Reminder and Disclaimer
 >     Nothing's settled yet!!!!!

I also left out the dozens of angry rants that people wrote after Guido 
first proposed static typing, leading him to change the proposal to 
runtime type checking, which by definition will slow down the code. 
Static typing is almost certainly not going to come to Python, but the 
typing annotations ("def method(x : int) -> bool") can be used by other 
tools perhaps to do optimizations at compile time.



More information about the Python-list mailing list