3 ms·
That's an ingenious solution. Whoever thought of that was very, very smart, forward looking and insightful. We need to bring that into illumos, the runtime link
by Annatar 7y ago
That's an ingenious solution. Whoever thought of that was very, very smart, forward looking and insightful. We need to bring that into illumos, the runtime linker in illumos already has capability to do all sorts of things before the excutable even starts, so it would be the perfect place to plug into. It can easily be made optional, so programs which do not generate this declarative part will continue to function unmodified and nothing will be broken.
Just to set the record straight though, while the options in UNIX programs are very different from program to program, good UNIX programmers know to use getopt(3C) libc function and not invent their own custom parser. All programs which use getopt(3C) have a uniform, consistent option parser and command line behavior. https://illumos.org/man/3c/getopt https://illumos.org/man/3c/getopt
- floatboth 7y agoIf only http://docopt.org http://docopt.org was invented and standardized and widely adopted in the 80s… > good UNIX programmers know to use getopt(3C) libc function Well, when writing in C. People don't really use this from other languages.
- ohithereyou 7y agoWe use getopt style command line parameter parsing in at least Java, Perl, Python, and BASH at work, so I wouldn't say that this is unused. We're also primarily a UNIX shop at work, so that might be part of it.