ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject RE: [PATCH] refactoring of javac task into factory
Date Sat, 16 Dec 2000 03:48:16 GMT
At 10:37  15/12/00 -0500, Jay Glanville wrote:
>;-) I think we have a difference of opinion as to the definition of a magic
>property. ;-)  To me, a property is magic if it is implicit.  A property is
>magic if the task using it doesn't get the information from it's attribute
>values.  In my patch, the task does not have to rely on the existence of a
>"global variable" (ie: a system property), it gets all it's information from
>it's attributes.

Ahh but you advocated the use of a global variable to solve the problem.
Remember? ;) You wanted the attribute to be assigned via a global variable.
Now the particular name and even existence of such a property would be
project specific. So you seem to be advocating a magic variable that can
change at any time ;) It doesn't matter if the mapping from magic variable
to attribute is explicit for it would functionally and conceptually be much
the same.

This kind of approach may be applicable to certain facades (such as the
javacc compiler facade) but it is not applicable to javac where indidual
developers preferences make little difference to build.

>> >The ability to provide a classname for the
>> >compiler allows much more flexibility for users where the 
>> core supplied
>> >tasks don't meet their needs.
>> right - but I think we can do it better someother way ;)

At one stage there was a proposal for CSS mapping. So you would apply a CSS
sheet to the build file. Like


  pedantic: true;
  depend: true

Or someother such thing. You could overide it in build file by manually
setting attributes but for all other purposes it did it "magically" via style.

Not sure what became of proposal (if anything ?)

>To me, a magic property is analogous to a global variable in C.  If you
>designed your code right, there were very few needs for global variables.
>To me, attributes in ant are analogous to parameters in a method, where the
>task is the method.  If I can, I'd like to remove global variables.

Right. But your solution involved passing in a global variable as a
parameter. Except the name of global variable is potentiall different in
each different project, as is the existence of global variable. Except most
developers want the global variable so ...



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message