[En-Nut-Discussion] Attempting to fix network config API.
Harald Kipp
harald.kipp at egnite.de
Mon Aug 25 10:54:34 CEST 2014
Hi Thiago,
On 22.08.2014 21:39, Thiago A. Corrêa wrote:
> The Nut prefix is quite common in our public API. It could be said
> that Nut functions are public API while non-Nut functions are private
> API, whether it's intentional or not, I can't think of public API
> without the prefix
While running out of manageable unique names, I decided to switch from
NutHttp... to Http... for the new Web-API.
Actually the old API should have been NutNetHttp..., but function names
like NutHttpGetParameterName are sufficiently clunky.
> Also I think Nut[Net]Setup[Dhcp|Static] is odd as it places an
> adjective at the end "of the sentence".
I'd interpret DHCP as an object and static as an abbreviated statically.
The idea is, that some kind of prefix sorting rule is easier to
remember, like
NutEvent...
NutEventPost
NutEventPostAsync
in opposite to
Nut...Event
NutPostEvent
NutAsyncPostEvent? Asynchronously posting and event
NutPostEventAsync? Posting an event asynchronously
NutPostAsyncEvent? Posting an asynchronous event
Or was it PostNutEventAsyncly? Just kidding. ;-)
> How about the pair:
> NutNetStaticIfSetup and NutNetDhcpIfSetup?
My post was meant as a pointer only. I do not insist on any specific
naming style. Your suggestions look OK to me too.
Regards,
Harald
More information about the En-Nut-Discussion
mailing list