[melbourne-pug] structual subtyping
Birch, Bill
birchb at anz.com
Tue Mar 21 08:03:42 CET 2006
Hi,
You asked:
What do you mean by "structural subtyping"?
In short if an object looks like another object it's a structural subtype. Given a type T which consists of things with four legs, then dogs and tables are subtypes of T because they have four legs. So if I can see the internal structure of an object I can subytype this way.
For OO-encaspulated languages the subtyping is limited to the public methods. Given a type C which consists of things which respond to the command 'draw', both an Artist and a Cowboy are subtyes of C. Note the semantic dissonance ;-)
I'm playing with the first kind, ie subtyping of composite, un-named, un-encapsulated objects (which may have been read in as input).
The wikipedia definition http://en.wikipedia.org/wiki/Structural_subtyping is here.
Cheers,
Bill
-----Original Message-----
From: melbourne-pug-bounces+birchb=anz.com at python.org
[mailto:melbourne-pug-bounces+birchb=anz.com at python.org]On Behalf Of
melbourne-pug-request at python.org
Sent: Monday, 20 March 2006 10:00 PM
To: melbourne-pug at python.org
Subject: melbourne-pug Digest, Vol 10, Issue 3
Send melbourne-pug mailing list submissions to
melbourne-pug at python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/melbourne-pug
or, via email, send a message with subject or body 'help' to
melbourne-pug-request at python.org
You can reach the person managing the list at
melbourne-pug-owner at python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of melbourne-pug digest..."
Today's Topics:
1. Re: New list member (brucedecoy-post at yahoo.com.au)
----------------------------------------------------------------------
Message: 1
Date: Sun, 19 Mar 2006 22:26:48 +1100 (EST)
From: <brucedecoy-post at yahoo.com.au>
Subject: Re: [melbourne-pug] New list member
To: melbourne-pug at python.org
Message-ID: <20060319112648.47943.qmail at web60219.mail.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1
Bill Birch wrote:
> Hi,
>
> Having just joined this mailing list, I thought I'd
> introduce myself. I'm currently using Python 2.4 at
> work to convert images and auto-generate test cases
> for a Java application. It has been a very pleasant
> experience using Python. Although I keep forgetting
> the :
You get used to it after a little while:
> Outside work I'm particularly interested
> in "structural subtyping" and have started a modest
> project to add some of that to Python.
What do you mean by "structural subtyping"?
> Looking forward to meeting some local Pythonistas!
We haven't had a get together for quite a while.
Anyone interested in meeting to share some
experiences?
>
> Bill Birch
Bruce
____________________________________________________
On Yahoo!7
Music: Create your own personalised radio station.
http://au.launch.yahoo.com/
------------------------------
_______________________________________________
melbourne-pug mailing list
melbourne-pug at python.org
http://mail.python.org/mailman/listinfo/melbourne-pug
End of melbourne-pug Digest, Vol 10, Issue 3
********************************************
More information about the melbourne-pug
mailing list