[Types-sig] Issue: definition of "type"

Martijn Faassen m.faassen@vet.uu.nl
Mon, 20 Dec 1999 17:17:25 +0100

Paul Prescod wrote:
> I'm on the fence about this last requirement because I would like to
> think that all of the code out there with class statements is *already*
> defining a bunch of types. A minority of it depends on runtime
> information and we can easily detect those cases. So why not let the
> simple case of "defined class that doesn't depend on runtime
> information" be a shortcut for a type declaration?

Are you sure that in fact a minority depends on runtime information?
Often Python code is used without any inheritance link, like this:

class Foo:
    def doSomething(self):

class Bar:
    def doSomething(self):

a = [Foo(), Bar()]

for el in a:

Doesn't this rely on run-time information? How would a type system deal
with this? I suppose I'm entering the domain of interfaces now...