Re: Re: Registries [2]
Daniel Wallin <[email protected]>
| Newsgroups | gmane.comp.lib.boost.langbinding |
|---|---|
| Message-ID | <[email protected]> |
At 13:47 2003-07-29, David Abrahams wrote: >Daniel Wallin <[email protected]> writes: > > > At 13:51 2003-07-28, David Abrahams wrote: > >>Yes, I meant essentially that all local chains for a type would share > >>a tail: the corresponding global chain. > > > > Ok, I've been thinking about this. > > > > The biggest problem I can see with this is that we can't eliminate > > duplicate converters, if a module registers a converter for type X > > it will get a duplicate in the global chain. Of course things will > > still work as expected, but overload resolution will suffer in terms > > of performance since we'd need to try more converters before we can > > conclude that there's no match. > >Oh, I guess. I don't really think failed matches have to be fast, but >I also don't really care if you want to use a more-sophisticated >mechanism to optimize them. It's not the failed matches, but the entire overload resolution that needs to be fast. If there were no overloads, we wouldn't have a problem. > > Also, identical converters registered by multiple modules can't be > separated, > > so we'd end up with a lot of identical converters for primitive types. > > I guess we could keep all primitive converters in the shared > > library. > >I don't see "where they are kept" quite the same way you do, I >think -- it's all one shared memory space. However, yeah, the shared >lib should register those primitives itself. That's what >Boost.Python does now. Yeah, I meant that the primitives could reside only in the global chain.. > > This is an issue with automatic importing in general though. > >Not sure I see an issue. I meant the issue with unnecessary long converter chains, mostly due to duplication. I'm starting to doubt our motives for local registries altogether, I might be forgetting something or I might be drunk, but right now it seems to me that we'd be better off with only a global registry. I just can't think of any cases where there would be interest in hiding converters. This is quite a turnover for me, so if someone could convince me that there are benefits with local registries I'd be glad. ;) --- Daniel Wallin ------------------------------------------------------- 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