Why the fuck do all these leftpad is-even hello-world tic-tac-toe packages have millions of downloads?
Why the fuck do all these leftpad is-even hello-world tic-tac-toe packages have millions of downloads?
Even POSIX gives you getopt(1) and getopt(3). What other language doesn't? I can only think of Java.
Also, other languages are Rust, Kotlin, Swift (to name a few `modern` ones). Yes, Kotlin and Swift have `first class` CLI parsing libraries, but they are not part of standard library.
You're also missing the forest for the "well actually" trees: Lots of languages have argument parsing in their stdlib.
it absolutely does not belong in stdlibs, where it can never be changed. that's how you end up with too many terrible CLI tools using Go's `flags` package.
20-30 LoC maybe. `process.argv.slice(2).forEach(str => ... )`.
there is no access to the raw command-line invocation, sadly, so you really can't really do anything fancier than that.
>config loading
that thing "RC" package does - looking up the config file in random locations - is really strange to me. aren't you the one in control of where it is stored?
And perhaps some faked download numbers to lend an air of authenticity.