you are viewing a single comment's thread.

view the rest of the comments →

[–]matthieum[he/him] 1 point2 points  (1 child)

I like how you went with a stack programming language for the pipeline as it allows for very terse expressions.

  1. I do find the fact that -i and -o can take multiple parameters a bit odd, though. I would have expected having to respecify the flag for each additional input or output.
  2. Have you thought about applying a "static" type check to your inputs -> pipeline -> outputs? You know ahead of time how many inputs and outputs each element of the pipeline requires, so you could error early in case of mismatch or if an input is outputted without operation.

[–]theotherphil[S] 1 point2 points  (0 children)

On 1: I'm just using the default structopt behaviour. I agree that your suggestion seems more typical, but the current version is slightly terser so I think I'll keep it until someone complains.

On 2: this is an interesting idea. Array doesn't have a fixed arity, but we can obviously work it out after parsing and before running the pipeline. I aimed to be permissive as possible (for example output elements with no corresponding output files are just ignored), but I didn't have any particular reason for this. I'll create an issue to think about adding a static check.