[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r10381 - trunk/build/generator

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-07-24 03:31:27 CEST

Russell Yanofsky wrote:

>Branko ÄOibej wrote:
>
>
>>Keeping a reference to a state object is better than relying on global
>>variables.
>>
>>
>I'm not saying we should use global variables either. We can pass the
>generator object around wherever we need it. But we shouldn't make the
>generator object an attribute of target objects because conceptually, it
>isn't one.
>
>
Well, yes, if the generator ever learns to create scripts for several
targets at once (having more than one generator object live at the same
time, with only one set of targets), then I'd say that's a valid
argument. But right now, something like that can't work because the list
of targets (or the targets' attributes) depends on the generator used.

In the end, the decision between

    t = Target(self, x, y, z)
    t.add_dependencies()

and

    t = Target(x, y, z)
    t.add_dependencies(self)

depends on how many target methods depend on the generator state. If
it's only a few, the second form is probably nicer.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 24 03:31:38 2004

This is an archived mail posted to the Subversion Dev mailing list.