洪 民憙 (Hong Minhee) :nonbinary:'s avatar
洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee@hollo.social

Interesting design question for (a type-safe parser for ): how should it handle unrecognized options in wrapper/proxy tools? Proposed three modes but wondering if the complexity is worth it. Thoughts?

https://github.com/dahlia/optique/issues/35

jnkrtech's avatar
jnkrtech

@jnkrtech@treehouse.systems · Reply to 洪 民憙 (Hong Minhee) :nonbinary:'s post

@hongminhee I like the passthrough idea but unrestricted greedy feels like a footgun to me. I think it would lead to end users having to think about the order in which they pass non positional parameters, which I always hate.

I wonder if it would make sense to have some kind of optional filtering or validation on the passed through parameters? As in, what if everything was “greedy”, but with additional restrictions and sugar put on top? Like, “pass everything through, except for handlers I already have defined” as the implementation for the less-greedy mode, rather than having two separate first-class modes.

These are just spitballs, I haven’t convinced my team to switch to Optique yet so I don’t have a stake here 😅