List Info

Thread: structual subtyping




structual subtyping
user name
2006-03-21 07:03:42
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 htt
p://en.wikipedia.org/wiki/Structural_subtyping is here. 


Cheers,
Bill


-----Original Message-----
From: melbourne-pug-bounces+birchb=anz.compython.org
[mailto:melbourne-pug-bounces+birchb=anz.compython.org]On Behalf Of
melbourne-pug-requestpython.org
Sent: Monday, 20 March 2006 10:00 PM
To: melbourne-pugpython.org
Subject: melbourne-pug Digest, Vol 10, Issue 3


Send melbourne-pug mailing list submissions to
	melbourne-pugpython.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-requestpython.org

You can reach the person managing the list at
	melbourne-pug-ownerpython.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-postyahoo.com.au)


------------------------------------------------------------
----------

Message: 1
Date: Sun, 19 Mar 2006 22:26:48 +1100 (EST)
From: <brucedecoy-postyahoo.com.au>
Subject: Re: [melbourne-pug] New list member
To: melbourne-pugpython.org
Message-ID: <20060319112648.47943.qmailweb60219.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.co
m/



------------------------------

_______________________________________________
melbourne-pug mailing list
melbourne-pugpython.org
http://mail.python.org/mailman/listinfo/melbourne-pug


End of melbourne-pug Digest, Vol 10, Issue 3
********************************************
_______________________________________________
melbourne-pug mailing list
melbourne-pugpython.org
http://mail.python.org/mailman/listinfo/melbourne-pug
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )