Drop two-phase command-line parsing
eyalroz opened this issue · comments
Eyal Rozenberg commented
We currently parse our command-line in two phases: One kernel-inspecific, then another that's kernel-specific, where the arguments and required preprocessor definitions can be passed as command-line arguments.
Benefits:
- We get a necessary argument and define listing "for free"
- Can keep the initial parsing entirely independent of which kernel we want to run
Detriments:
- More code.
- More complex, non-C++-idiomatic code.
- Kernel parameter names can clash with basic command-line argument names
- One-char kernel parameters need to be handled differently than multi-char.
Now, actually, in hindsight, we can achieve benefit (2.) and take the kernel arguments, by passing --argument name=val
's. So, let's drop the existing scheme and just do that instead.