Greg Ewing wrote:
> Bill Janssen wrote:
> 
> > Duck typing is a seriously bad idea, forced on Python by the now
> > obsolete split between built-in types and user-defined types.
> 
> Non-duck typing is a seriously bad idea, forced
> on some other languages by static typing. Python
> is mercifully free of such constraints.

I'm thinking that Mike Orr's question, "are we all talking about the
same duck-typing", makes sense.  Greg, I'm not suggesting static
typing -- I much prefer dynamic strong typing.  But what Python has
now is dynamic weak typing, which makes programs (particularly
frameworks) fragile.  And it's mainly due to the historical accident
of not being able to inherit from C-based types in Python 1.x.

I'd like to be able to look at a value and determine which interfaces
I can safely invoke on it, even if I don't understand its full type.
I can't (safely) do that by string-matching method names.

Bill
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to