Default database / namespace
Robert Wittams
robert.wittams@ic.ac.uk
Tue, 4 Jul 2000 10:37:59 +0100
Just expanding on a couple of things...
> > link() and bind() seem like the same thing to me; likewise unlink() and
> > unbind(). Is there a semantic difference?
> Well, link just gets inserted as an entry in the namespace.
> bind() means that it is treated as an extension of the namespace.
>
> But I see what you mean... I can't quite get it straight in my head
> right now, but it might be possible to do away with one of them, which
> would be nice. hmmmmm.....
> This would be a bit more like monikers in COM I think...
>
> I don't know how you would do proper stacking in this situation.
> Have to think more ;-)
I think this could work if when the key was linked in, the namespace
implementation did check alleged key type, (or queryinterface if
we agree that is good). If it was a namespace, it would be recorded
as such and queries would be passed down in the moniker style.
All this is pretty hard to explain without an implementation.
> > > and she does these queries:
> > >
> > > /linux/usr/local/bin - returns a set which has the contents of that
> > > directory under linux
> >
> > Not a namespace, I take it --- just a set? You're talking about
> > building a flat, nonhierarchical namespace, then?
>
> Yeah, I think returning another namespace is better come to think of it.
In this case , a method of iterating over the immediate children of a
namespace
is needed. Otherwise you won't get much done ;-)
> eg in psuedo python
>
> namespace = os.eros.namespace
> result = namespace->get("/happy/cheeky/monkey")
> try:
> animal = result->qi("Animal")
> zoo->addanimal("animal")
> except qiFailed:
> print("Not an animal
> !")
Oops, got python/perl mixed up. s/->/\./
The vagaries of emailing late at night.
Rob