5 ms·
I really like the level of that documentation. Very beginner friendly, with a reasonable level of completeness mingled within. A short diversion for basic std
by JNRowe 7y ago
I really like the level of that documentation. Very beginner friendly, with a reasonable level of completeness mingled within. A short diversion for basic std::env::args() access, with a quick switch to using clap for decent common behaviour.
Having worked on a project written in nim today the contrast is huge: The documentation isn't great, the stdlib argument parsing is odd, if you use argparse¹ then nim-using devs expect different behaviour, etc.
1. https://github.com/iffy/nim-argparse https://github.com/iffy/nim-argparse
- ShorsHammer 7y agoFor anyone actually building a product for others, please use clap, it's excellent.
- JoshMcguigan 7y agoFor anyone who hasn't seen it, I highly recommend structopt over clap. It is a wrapper around clap which provides type safe parsing of CLI arguments into a struct you define. It is also what TFA uses.
- vamega 7y agoWhat's TFA?
- codezero 7y agoThe Featured Article (I changed the F word)
- JoshMcguigan 7y agoI always thought it was "The Fine Article".
- ShorsHammer 7y agoWholesome internet people unwilling to say the word "fucking" It's: The Fucking Article
- deleted 7y ago[deleted]
- codezero 7y agoAre you implying fuck is unwholesome? Why would you think that? I’m intrigued.
- ShorsHammer 7y agoAs an Australian, no, not at all, but many people are certainly quite sensitive about such things and we generally have to acknowledge/modify behaviour as decent internet citizens because of it.
- TsiCClawOfLight 7y agoA bit late, but the next major release of clap will include structopt: https://clap.rs/2019/03/08/clap-v3-update-structopt/ https://clap.rs/2019/03/08/clap-v3-update-structopt/