[Python-ideas] Improving the expressivity of function annotations

Masklinn masklinn at masklinn.net
Mon Apr 4 21:30:52 CEST 2011


On 2011-04-04, at 21:05 , Michael Foord wrote:
> On 4 April 2011 20:04, Masklinn <masklinn at masklinn.net> wrote:
>> On 2011-04-04, at 20:47 , Michael Foord wrote:
>>> It's a standard term for languages like C# and Java, but if you don't use
>>> these languages there is no reason you should know it. Generics is a
>>> solution (hack - but still an elegant hack) that allows you to write
>>> "generic" containers and functions that can work with any types whilst
>> still
>>> being type safe.
>> 
>> Why do you find generics to be a hack?
>> 
> Because with a good dynamic type system they are completely unnecessary.

If you go that way, types themselves are unnecessary "and therefore hacks", static or not.

I don't think that makes much sense, though I can see you were probably replying in jest I was interested in the answer.


More information about the Python-ideas mailing list