[Olsr-dev] questions regarding v2 coding style / lang

(spam-protected) (spam-protected)
Mon Sep 8 08:38:54 CEST 2008


I don't code on this project but I agree with Henning completely. Also, as a side note, macros are not type safe which violates the strictness of c / c++..

Best regards,
Martin

------Original Message------
From: Henning Rogge
Sender: 
To: OLSR development
Sent: Sep 8, 2008 12:27 AM
Subject: Re: [Olsr-dev] questions regarding v2 coding style / lang

My suggestions for coding style are simple:

No (or nearly no) macros except for constants. Most macros make the code 
unreadable and difficult to debug.

No code in header files, it does belong into the source files.

No "source code compression". There is no reason the write extra tricky source 
code only because it saves a few lines if the longer (and more readable) code 
would result in a similar binary.

No scripts to create code. Generated code is a nightmare to read and to debug.

Doxygen comments for all functions (we have done this for most functions).

Clear namespaces for all functions/global variables in a .c file. Maybe a 
common prefix which is a "compressed" but easy to recognize version of the 
filename itself ( I use the prefix "pbb_" for all packet_bb parser 
functions).

Henning

*************************************************
Diplom Informatiker Henning Rogge
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN) 
Neuenahrer Str. 20, 53343 Wachtberg, Germany
Tel.: 0049 (0)228 9435-961
Fax: 0049 (0)228 9435-685
E-Mail: (spam-protected)
Web: www.fgan.de
************************************************
Sitz der Gesellschaft: Bonn
Registergericht: Amtsgericht Bonn VR 2530
Vorstand: Dr. rer. nat. Ralf Dornhaus (Vors.), Prof. Dr. Joachim Ender 
(Stellv.)

-- 
Olsr-dev mailing list
(spam-protected)
http://lists.olsr.org/mailman/listinfo/olsr-dev


Sent via BlackBerry by AT&T


More information about the Olsr-dev mailing list