You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stephane Bailliez <sb...@imediation.com> on 2002/01/07 12:46:00 UTC

RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types E numeratedAttribute.java

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]

> Not probably - definetly. We should make methods/variables as 
> private and 
> final as possible to make evolution easier. You can never 
> remove access once 
> something is released but you can always open up things later 
> if need be.

This is fine for me, then no protected attributes at all must exist.
FYI we have about 183 occurrences of 'protected' in the code.

> Large number of subclasses or deep hierarchies are considered 
> harmful by some people ;)

Abuse of anything is always harmful so that's not really an argument...

> Much easier to evolve those tasks though and much easier to 
> maintain. In most 
> cases you can disregard the getters because very few of them 
> actually get 
> used anywhere and the setters are part of the Ant patterns so 
> I am not sure how you would propose to avoid them ?

I was talking about the getters of course.

Stephane.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types E numeratedAttribute.java

Posted by Peter Donald <pe...@apache.org>.
On Mon, 7 Jan 2002 22:46, Stephane Bailliez wrote:
> > -----Original Message-----
> > From: Peter Donald [mailto:peter@apache.org]
> >
> > Not probably - definetly. We should make methods/variables as
> > private and
> > final as possible to make evolution easier. You can never
> > remove access once
> > something is released but you can always open up things later
> > if need be.
>
> This is fine for me, then no protected attributes at all must exist.
> FYI we have about 183 occurrences of 'protected' in the code.

we also have a few public attributes ;( 

-- 
Cheers,

Pete

When a stupid man is doing something he's ashamed of, he always 
declares that it is his duty.
					 George Bernard Shaw 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types E numeratedAttribute.java

Posted by Magesh Umasankar <um...@apache.org>.
From: "Stephane Bailliez" <sb...@imediation.com>

> This is fine for me, then no protected attributes at all must exist.
> FYI we have about 183 occurrences of 'protected' in the code.

You are taking a difficult stance here because we cannot 
privatise all protected attributes without sacrificing backwards
compatibility.  I recognize there are various such places
like you point out - in fact, EnumeratedAttribute itself
has 'value' as a protected attribute.  

While I agree that having getters bloat the code a bit,
it gives us more freedom to make changes in the future,
without worrying about backwards compatibility. 

I am just saying that code that we commit in the
future consider the evolution aspect of it. Just my $0.02.

> 
> Stephane.
> 

Magesh


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>