[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: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2004-07-24 03:57:37 CEST

Branko Čibej wrote:
> Russell Yanofsky wrote:
>> 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.

That's the thing. The list of targets and the targets' attributes should not
depend on the generator used, and they didn't before this change.

> 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.

I don't think so. To my mind, adding a pointer member to an object is
analogous to adding a foreign key column in a database table. It should be
avoided unless it represents a conceptual relationship between the two
entities.

- Russ.

---------------------------------------------------------------------
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:58:10 2004

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