Opinions: API wrapping, how close to original API should you stay?

Nik Clayton nik at ngo.org.uk
Thu Oct 5 09:15:09 BST 2006


Ian Malpass wrote:
> Nik Clayton wrote:
> 
>> Assuming you were writing to this API, would you prefer to use:
>>
>>    $ml->get_optimistic_lock()
>>
>>    $ml->get_OptimisticLock()
>>
>>    $ml->getOptimisticLock()
>>
>> to retrieve the value, or something else?
> 
> Could you support both 1 and 3? Or would that just cause confusion?

It's easy enough to do.  I'm not sure it'll lead to maintainable code in the 
future though (in the sense of consumers of this object, rather than the 
object itself).

N



More information about the london.pm mailing list