Exforsys

Free Training

Re: Extends is evil?

This is a discussion on Re: Extends is evil? within the Software Patterns forums, part of the Testing category; Carl Gundel wrote: > Perhaps ChessClub isn't a Set, but a Club. If I compute the union of > two ...

Go Back   Exforsys > Testing > Software Patterns

Exforsys.com

  #21 (permalink)  
Old 09-14-2003, 06:13 AM
Chris Uppal
Guest
 
Posts: n/a
Re: Extends is evil?

Carl Gundel wrote:

> Perhaps ChessClub isn't a Set, but a Club. If I compute the union of
> two clubs, should this return yet another instance of club? Smells
> wrong to me.


That's a good point, but it could be that the union of two [Chess]Clubs is just
a Set. (Compare
#start , #end
which is a String rather than a Symbol.)

Since this thread has risen from the grave, I may as well add the point that I
never got around to making earlier:

If a ChessClub were a Set then *which* set would it be ?
The set of club rules ?
The set of hardware (chess sets, clocks, etc) that it owns ?
The set of current, active, members ?
The set of paid-up members ?
The set of active + associate members ?
The set of paid-up members + those who haven't yet paid this year's
subscription, but will probably do so when the club secretary
gets annoyed enough ?
etc...

-- chris


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #22 (permalink)  
Old 09-14-2003, 05:38 PM
panu
Guest
 
Posts: n/a
Re: Extends is evil?

Carl Gundel wrote:

> Perhaps ChessClub isn't a Set, but a Club. If I compute the union of
> two clubs, should this return yet another instance of club? Smells
> wrong to me.


Isn't this what happens exactly when two chess clubs
decide to merge?

The new chess club has each member of the original
clubs as its members. But if a person was a member
of both clubs before the merger, he still won't be
a duplicate member in the new club.

Yes, ChessClub isn't the same thing as Set. But
one (simple) way of modeling a chess-club would
be to create a subclass of Set named ChessClub.

Models are models. They aren't the same thing as
the thing being modeled. It is wrong to mix the
two levels, which easily happens. A chess club as
we speak of it is a 'real thing' existing because
actual people contracted together to create it.
But Set is simply a class in Smalltalk.

So ChessClub and Set are two separate things. But
they are *similar* in some ways and therefore it is
possible to model ChessClubs as a (subclass of) Set.

-Panu Viljamaa

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:35 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.