Bob Nystrom

Results 973 comments of Bob Nystrom

I actually quite strongly prefer the current guidance in Effective Dart. I wouldn't support the lint deviating from it. My arguments are: 1. Billions of lines of correct code are...

> > If you can't understand a short function without redundantly type annotating a local variable .. > > So what's the type of `var y = foo(x);`? In: ```dart...

I think most users simply print the description themselves before printing the usage information: ``` A simple description usage: [-c] [-r] [-a] [-s] [-m] [--[no-]checked] [--[no-]host-checked] [-t] [-j] [--shards] [--shard]...

I've thought about this before, but my impression is that it doesn't add enough value to carry its weight. Fundamentally, argument parsing is about taking in *strings* and doing something...

We should definitely document it, and if the name is invalid, `addOption()` should throw eagerly and let you know. I personally don't find it very compelling to support `.` in...

> Can you include dot to the pattern? The dot is commonly used like this: > `curl --http1.1 https://example.com` Yeah, we could definitely extend the regex to allow dots. I...

Maybe the right long-term fix for this is to reify options into a first-class object. Then you could build up a list of options, sort them however you like, then...

> Is the performance differential with trailing commas new? Argument lists have always been relatively slow to format because: 1. The number of ways an argument list can split is...

I don't know if I'm sold on a user-visible option named `--undefok`. But I have fairly frequently wished that ArgParser was more flexible about unknown options. I never found the...

> * We'd need other, potentially difficult, behavior differences to support this with a `handleUnknownOption` because we'd need to be sure that the callback for `--undefok` before the unknown options...