On 4/29/09 3:07 AM, Malthe Borch wrote:
> 2009/4/29 Chris McDonough<chr...@plope.com>:
>> If this really is due to the wildcard thing: IMO, zope.component should
>> probably
>> try to match any lookup against wildcard registrations dead last.  I'm sorta
>> surprised it doesn't.
>
> It does it in-order with adapters queried in order of specialization;
> but adapters that are specialized come in last.

That seems completely broken to me.  It also doesn't match my (limited) 
experience but I've never fought with it hard enough to know.

>> But in general, interface inheritance seems pretty evil.  I'd rather that it
>> just composed the "requires" interfaces by looking up the MRO of the
>> instance and its base classes rather than combining that with the concept of
>> an "iro".
>
> This again comes with an idea of "availability" I think; it might be
> that your adapter is more specialized, but it also claims to implement
> its iro.

I just had a bad flashback: "DTML expression lookup rules".

>> I think maybe the right thing to do there (if we can't fix it) is to just
>> repeat ourselves in configuration.
>
> Yes; or as in my example, resort to registering "normal" views for
> ``IGetRequest``. It's probably good practice anyway.

The real problem with doing the more clever thing is that it's just too hard 
for 
any actual human to know what's going to happen.  And the only real way to fix 
that is to simplify the implementation, IMO.  Indicators like "+" in front of 
interface names makes me think of:

#div {
     color: blue !important
}

.. and we all know how fun that is.

- C
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to