Re: 7.0 wishlist?
- From: Andreas Leitgeb <avl@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 14 Nov 2008 08:12:00 GMT
Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx> wrote:
Andreas Leitgeb wrote:
Joshua Cranmer <Pidgeot18@xxxxxxxxxxxxxxx> wrote:[example snipped, as it boiled down to exactly my prognose]
Note, for example, that making a Square class extend a Rectanglewhat type of rectangle-related contract do you have in mind?
[...] would fail to match the Rectangle's contract.
I hope it is not something like "width!=height must be allowed"
Whether Square breaks Rectangle's contracts of course depends on the
contracts put up by Rectangle. If it contains goofy contracts then,
indeed, Square may not match those.
The idea that changing the height does not change the width is what isAnd that is, what I consider an #1 example of a goofy contract.
violated.
PS: but then again, the Square could override setWidth and setHeight
to throw a certain exception and instead offer a setSize...
The Rectangle class would have to "allow" the throwing of exceptions
in its contract for that.
.
- Follow-Ups:
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- References:
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Harold Yarmouth
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- From: Andreas Leitgeb
- Re: 7.0 wishlist?
- From: Joshua Cranmer
- Re: 7.0 wishlist?
- Prev by Date: Re: JNI jbyteArray
- Next by Date: Re: Possible bug in Calendar
- Previous by thread: Re: 7.0 wishlist?
- Next by thread: Re: 7.0 wishlist?
- Index(es):
Relevant Pages
|