Re: Registries [2]

David Abrahams <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
Sorry I didn't answer this earlier; it's tough because I don't feel I
have good answers.

Daniel Wallin <[email protected]> writes:

> At 21:30 2003-07-31, David Abrahams wrote:
>>Daniel Wallin <[email protected]> writes:
>>
>> >>
>> >>Hmm, you're suggesting importing cast graph components?  I don't know;
>> >>it seems like a waste for several extensions which are known to
>> >>collaborate to have to each maintain a separate copy of the cast
>> >>graph.  I think we can do better.
>> >
>> > Ok, do you have any ideas? Would it be impossible to just share
>> > subgraph's?  Meaning having edges that point to vertices in another
>> > local cast-graph.
>>
>>I honestly have no clue.  How would you know which other cast graph
>>to link up to?
>
> What's wrong with explicit importing? It's the duplicated storage that's
> bad, no?

Yes, I suppose.  Of course polymorphic classes have edges in both
directions, so importing converters and defining new conversions might
have an effect on the imported graph.  Then there's a cache which
records reachability and casting shortcuts, and that couldn't be
shared because different information might be visible on either side
of the extension boundary.

Of course, I haven't proven that the cache is really important to
speed -- it's another premature optimization -- but I'm guessing
you'll want it.  Certainly some people had problems with the speed of
stepwise up/downcasting in v1.

> How about revisiting hierarchical implicit importing? Didn't we only
> abandon that because we thought local registries wouldn't work
> on unix platforms?

Argh.  I don't remember.  However, it seems like it could only
complicate the cast graph issue.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.