Re: Desing Question re Multiple Constructors
- From: "Rhino" <no.offline.contact.please@xxxxxxxxxx>
- Date: Sun, 30 Oct 2005 08:33:59 -0500
"Roedy Green" <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx> wrote in
message news:ov58m1hcu3gq4oh9hkcr07iblk8cju7e7e@xxxxxxxxxx
> On Sat, 29 Oct 2005 11:12:09 -0400, "Rhino"
> <no.offline.contact.please@xxxxxxxxxx> wrote, quoted or indirectly
> quoted someone who said :
>
> >I have a design question about constructors.
>
> Here is a way to tackle that class of problem.
>
> Let's say you have three competing approaches.
>
> Write out the signatures for approximately what the three approaches
> would be.
>
> Now write some application code using the three approaches and see
> which you like best. You will soon discover which flows most naturally
> and which is easiest to maintain.
>
> You will only have to do the implementation once, but will be using it
> over and over.
>
> NOW go back and do the full implementation on the best design.
>
> This will block you from making the common error of designing classes
> easy to write rather than easy to use.
It sounds like you're saying that whichever one "feels" most natural is the
best one to use. Aren't there some sort of theoretical guidelines that can
be used to help me judge which approach is most appropriate? Surely it can't
be purely a "gut feel" kind of thing?
Rhino
.
- Follow-Ups:
- Re: Desing Question re Multiple Constructors
- From: Roedy Green
- Re: Desing Question re Multiple Constructors
- References:
- Re: Desing Question re Multiple Constructors
- From: Roedy Green
- Re: Desing Question re Multiple Constructors
- Prev by Date: Re: Desing Question re Multiple Constructors
- Next by Date: Re: testing methods
- Previous by thread: Re: Desing Question re Multiple Constructors
- Next by thread: Re: Desing Question re Multiple Constructors
- Index(es):
Relevant Pages
|