Hi Reuben, > I notice no-one mentioned argp. (I also notice one of autoopts's > testimonials says that it (autoopts) is simpler than argp!). But from > a quick look argp seems rather neat; it doesn't need a separate parser > and code generator, and it's available in gnulib. > > Why aren't I using it?
If you mean to ask "why are so few people using argp", here's the answer why I'm not using 'argp' in GNU gettext, GNU libiconv: 1) When I introduce a new option, I have to do 5 modification: - Add a variable that captures the value of that option. - Implement the semantics of the option. - Change main() and the getopt_long call to set said variable. - Update the usage() message. - Update the documentation. AFAIU, 'argp' would allow me to combine 2 of these 5 steps, leaving only 4 steps. But 4 modifications is not much of a simplification over 5. On the other hand, 'argp' has some complexity. I feel already saturated with getopt_long's complexity. 2) The 'argp' in glibc has some problem with internationalization, whereas the 'argp' in gnulib doesn't (fixed by Sergey on 2006-09-09). Quite confusing. Bruno -- In memoriam Bartolomé Blanco Márquez <http://en.wikipedia.org/wiki/Bartolome_Blanco_Marquez>