[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [esr@thyrsus.com: Re: CML2 0.2.0]

On Fri, Jun 02, 2000 at 08:14:46PM +0200, Tomasz Wegrzanowski wrote:
> ESR wrote
> > * Implement a stack of "weak" bindings for each symbol, each
> > associated with the symbol that forced it.  A user setting
> > overrides all weak bindings, otherwise more recent ones have
> > priority over older ones.  Whenever a symbol changes value all
> > the weak bindings it forces go away (then it may make new ones).
> > Indicate weak bindings with a distinguished foreground color.
> Why simple reference counting of such bindings won't work ?

You don't need a reference count.  You only really need a single bit
that says this option is on due do dependencies.  An analysis of the
dependency tree will tell you when it is no longer needed.
Furthermore, you would need to do dependency analysis to keep the
ref count up to date, so I don't think the ref count is the right

But there are still tricky issues.  Say that A depends on (B | C).
I say I want A.  B is the preferred dependency, and gets installed
with the "installed due to dependencies bit" set.  Later, I
explicitly install C.  How do you detect that B is no longer needed?
Here, Eric's "weak bindings" may be helpful in reducing the amount
of computation needed to figure it out.  But I haven't thought about
it enought, so I'm not sure.

That's why I think observing Eric's project may be interesting.


Reply to: