>>Wouldn't it be easier to allow null clients than to have these EmptyClient 
>>implementations?

>>Dean





>I think that'd be a lot of null checks.  It seems like it could add a fair bit 
>of code throughout WebCore, and folks would have to be careful not to forget 
>any null checks.


>EmptyClients seems like a fairly isolated solution, which only requires 
>maintenance when a client interface changes.


>-Darin
 
I had't looked at this issue before  and read the answer before the question 
but the current solution is
what I thought would be a reasonable approach. In some cases you also need to 
have many
different types of "null" or instrument your "null" and you have "debug null" 
etc. Aside from removing
clutter, this moves any "overhead" to just the users of the (fast) null object. 
 Usually the problem
with zero is that there is only one of them :) You could probably even 
autogenerate null objects from
headers to save maintenance. 
 
                                          
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to