Re: Callback naming

On Dec 2, 2009, at 13:16 , Dominique Hazael-Massieux wrote:
> Le mercredi 02 décembre 2009 à 13:44 +0200, Ilkka Oksanen a écrit :
>> There is related issue conserning SuccessCallback, ErrorCallback and 
>> PendingOperation interfaces. In camera API those interfaces are copied 
>> from Richard's Contact API draft. Would it be possible to create common 
>> parts specification or something similar for them to get rid of copy 
>> paste WebIDL?
> While that’s true for PendingOperation, I feel pretty strongly that in
> many cases (and in particular in the Capture API) we will want
> specialized SuccessCallback interfaces — I modified the Capture API
> document this morning to reflect that —, and possibly specialized
> ErrorCallback (this still needs to be fixed in the capture API draft)

Right, that's what I was going to say. I'm happy to add PendingOp to the Device API (I guess we should stuff all the reusable paraphernalia there), but we should discuss the others further — they may be very similar across APIs, but abstracting them away could be excessively early refactoring. Put another way, Early Optimisation + Theoretical Purity = Horrible Things :)

Robin Berjon -

Received on Wednesday, 2 December 2009 12:25:03 UTC