[getdns-api] API review section 3.1.2 and 3.1.3
Ray Bellis
Ray.Bellis at nominet.org.uk
Thu Jan 30 17:39:54 CET 2014
On 30 Jan 2014, at 16:32, Paul Hoffman <paul.hoffman at vpnc.org> wrote:
>
>> 3.1.3 also makes sense to me - the verb should come first followed by the object beign operated on. This primarily affects the context methods (i.e. getdns_context_create => getdns_create_context, getdns_context_set_resolution_type => getdns_set_context_resolution_type). Many code style guidelines follow this idiom.
>
> Sure, whatever. This helps literally no one after the first few minutes of them learning the API, but it seems like a harmless change.
What about IDEs with autocomplete?
Do people think about the type first, and then what action (getdns_context_set ...) or the action followed by the type (getdns_set_context...)
Personally, I *think* I would normally do the former - I kind of like all of the methods on a type to be grouped lexically. It's probably also more consistent with C++ where the type (or more accurately an instance of the type) comes first:
getdns_context_set_resolution_type becomes context.set_resolution_type
Ray
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org
More information about the spec
mailing list