Naming conventions and API functions

Hi list, while extending the POSIX-Wrapper for some socket stuff I realized that many functions in higher-end modules have very ambiguous names (I think I stumbled upon 3 functions called close() ). While it mostly isn’t a problem if you only use one module, trying to compile two modules can make the difference. Thus I would propose to name all public API functions in the well-established manner <module_name><function_name>() and all defines likewise <MODULE_NAME><MACRO_NAME>, etc., especially in the modules in the sys/net directory ;-).

Kind regards Martin

Dear rioters,

Thus I would propose to name all public API functions in the well-established manner <module_name>_<function_name>() and all defines likewise <MODULE_NAME>_<MACRO_NAME>, etc., especially in the modules in the sys/net directory ;-).

I fully agree with Martin.

Let me use this opportunity to point to the recently documented coding conventions for RIOT in the Github wiki [1].

Note, that these coding conventions are just my proposal so far. Please feel free to comment on this.

Cheers, Oleg

[1] Create new page · RIOT-OS/RIOT Wiki · GitHub