2 ms·
In no small part this is because parsing long opts can be significantly more complicated than short ones. It is by contrast very easy to parse short, single-le
by big_chungus 7y ago
In no small part this is because parsing long opts can be significantly more complicated than short ones. It is by contrast very easy to parse short, single-letter flags. Not saying it's not worth doing, but there is a reason this has not been standardized.
- dwheeler 7y agoParsing long opts is trivial; just determine if the string exactly matches. E.g., "--version" only matches "--version". Short opts is what takes slightly more effort, because you have to accept both "-ld" and "-l -d". We already handle the "hard" case, we just need to support the easy case.