tundra uses a particularly irritating #define pattern all over the codebase. You seem add a define for every config file or commandline option. This seems an entirely redundant practice to me as these user-facing strings should not change as compatibility with existing configs will be broken that way. Therefore there is no upside to having the strings defined centrally, from where I sit this just seems to have downsides.
Here's one example: I'm making tundra's --help output compatible with help2man so we can have a manpage without writing roff and keeping that up-to-date by hand. This requires aligning list items with an indented column of text for the description, like so:
*MODES OF OPERATION*\n\
translate The program will act as a stateless NAT64/CLAT translator.\n\
This is the default mode of operation.\n\
\n\
The alignment is obvious when translate is a plain string but when expanding "T64C_CONF_CMDLINE__OPMODE_TRANSLATE" this is a tiring game of trial and error. Further if the OPMODE_TRANSLATE define were ever to change, the alignment, together with the manpage will be broken without it being obvious.
Hi Vít,
tundra uses a particularly irritating #define pattern all over the codebase. You seem add a define for every config file or commandline option. This seems an entirely redundant practice to me as these user-facing strings should not change as compatibility with existing configs will be broken that way. Therefore there is no upside to having the strings defined centrally, from where I sit this just seems to have downsides.
Here's one example: I'm making tundra's --help output compatible with help2man so we can have a manpage without writing roff and keeping that up-to-date by hand. This requires aligning list items with an indented column of text for the description, like so:
The alignment is obvious when
translate
is a plain string but when expanding"T64C_CONF_CMDLINE__OPMODE_TRANSLATE"
this is a tiring game of trial and error. Further if the OPMODE_TRANSLATE define were ever to change, the alignment, together with the manpage will be broken without it being obvious.Thanks, --Daniel