 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
apple_amateur Guest
|
Posted: Sat Oct 25, 2008 1:56 pm Post subject: Subtypes |
|
|
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
|
Posted: Wed Oct 29, 2008 1:32 am Post subject: Re: Subtypes |
|
|
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 |
|
 |
|
|
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
|
|