AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subtypes

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions
View previous topic :: View next topic  
Author Message
apple_amateur
Guest





PostPosted: Sat Oct 25, 2008 1:56 pm    Post subject: Subtypes Reply with quote



Hi all,

I need some help to understand the following statement, which is from
a respectable source.

"A sub-typing mechanism is sound if and only if a method
implementation is protected by the types of its formal parameters."

In Java, from what I understand, the types of arguments used in each
method of a subtype class must be the same as the argument types in
comparable methods of the supertype class. Does the above statement
imply that a system based on a sound sub-typing mechanism should have
subclasses that have matching methods to their super classes?

If so, doesn't it mean that aspects like overloading are frowned
upon?

Why is sub-typing important?

Thank you, I hope that the above questions aren't too stupid and
irrelevant.
aa
Back to top
Donkey Hottie
Guest





PostPosted: Wed Oct 29, 2008 1:32 am    Post subject: Re: Subtypes Reply with quote



apple_amateur <angedward3 (AT) gmail (DOT) com> wrote in news:6bf1a684-6a46-4e99-8503-
91dc15cd3c2d (AT) k7g2000hsd (DOT) googlegroups.com:

Quote:
Hi all,

I need some help to understand the following statement, which is from
a respectable source.

"A sub-typing mechanism is sound if and only if a method
implementation is protected by the types of its formal parameters."

In Java, from what I understand, the types of arguments used in each
method of a subtype class must be the same as the argument types in
comparable methods of the supertype class. Does the above statement
imply that a system based on a sound sub-typing mechanism should have
subclasses that have matching methods to their super classes?

If so, doesn't it mean that aspects like overloading are frowned
upon?

Why is sub-typing important?

Thank you, I hope that the above questions aren't too stupid and
irrelevant.
aa

Please ask this in comp.lang.java.programmer

alt.comp.lang.java is quite dead and irrelevant.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.