On Sun, 10 Oct 2004 23:15:08 +0900, Jamis Buck <jgb3 / email.byu.edu> wrote:
> You realize, I hope, that Syringe is in a HUGE state
> of flux right now, and the API is guaranteed to change in all kinds of
> non-backwards-compatible ways, right?
Understood :)

> A new service model would not really help in this case, because once the
> Logger.new constructor is called, the log_filename has already been
> returned as a string.
Refreshing the dependendant services would take care of this
particular problem (more details in my other reply), and wouldn't
require the creation of stub classes for "data" services.

> What is really needed, though, is an implementation of Logger that
> allows the filename to be changed on the fly. If that existed, there
> would be an easier (i.e., more tractable) solution.
The weakness of that is that it requires an API change to Logger,
which would not be required if dependency graph + dirty flag
propagation existed (other post). In addition, you'd get things like
automatic closing (as the previous logger goes out of scope) and
re-opening of the new file for free, without any Logger changes as
well.

However, it might be, that in some cases, service creation is
heavyweight enough that this "push" model is whats required. Or, as in
the example in my other post, if something changes an unrelated value
in the :config store, you don't want all services to be refreshed. In
which case it probably makes sense to have scoped :config* stores for
all configuration pertaining to a particular set of services.

Leon