More Typing Problems

Neal Gafter neal at gafter.com
Wed Sep 8 23:03:35 PDT 2010


On Wed, Sep 8, 2010 at 5:12 AM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

>  I'm referring to the classic notion structural subtyping [1] (very common
> in theoretical tractations); a structural type-system would give you the
> ability to denote "the type of an object that has some method called
> getName", as in the original email - in Java, you can't do that - sure you
> can mimick structural subtyping with generics by using a type-variable bound
> of some type A where A has a member named 'getName' - but that's not
> structural subtyping.
>
> [1] - http://en.wikipedia.org/wiki/Structural_type_system
>

You should talk to Brian Goetz, who appears to have a completely different
definition of structural typing when he uses the term in the context of
justifying the removal of function types from the lambda draft.

Cheers,
Neal


More information about the lambda-dev mailing list