3 ms·
"better" is very subjective. If you just want short options, getopt code is shorter, far more portable and easier to write. Even if you DO want long options, ar
by Arch-TK 5y ago
"better" is very subjective. If you just want short options, getopt code is shorter, far more portable and easier to write. Even if you DO want long options, argp is still not portable meaning that unless you only want to support glibc linux, you have to keep a local copy or rewrite or fallback from arpg.
- teddyh 5y agoIf we always limit ourselves to “portable” code, how can we ever progress beyond POSIX?
- Arch-TK 5y agoGenerally it involves writing new code, which can itself be portable and can be reused. I would also note that even POSIX isn't portable in some contexts (such as trying to write code which can run on windows too).