I will investigate. Worst case I implement a one-line class for every
individual Enum type we do this with, not a huge deal.


On Wed, Apr 2, 2014 at 1:23 PM, mdmkolbe <notifications@github.com> wrote:

> In src/javasources/KTool/src/org/kframework/kompile/KompileOptions.java:
>
> > +import com.beust.jcommander.ParameterException;
> > +import com.beust.jcommander.ParametersDelegate;
> > +
> > +public final class KompileOptions implements Serializable {
> > +
> > +    public static enum Backend {
> > +        pdf(true, false),
> > +        latex(true, false),
> > +        doc(true, false),
> > +        html(true, false),
> > +        kore(false, false),
> > +        maude(false, false),
> > +        java(false, true),
> > +        unparse(false, false),
> > +        unflatten(false, false),
> > +        unflatten_java(false, true),
>
> Well, I see two possible concerns.
>
> (1) If the tutorial, documentation or some tool uses this option, then
> this would break the command line API presented by kompile.
>
> (2) Most program use "-" instead of "_" in their command line options. One
> reason for this is that "-" is easier to type and is a single keystroke
> instead of a shift-keystroke (at least on a US Qwerty keyboard). But,
> without getting into debates about the aesthetics one versus the other, "-"
> is much more common and will be more familiar to users.
>
> In the grand scheme of things, both of these concerns are relatively
> minor, so it comes down to a question of how much we allow the limitations
> of JCommander to dictate the command line interface. If it is relatively
> easy to get JCommander to support "-", then I'd do that, but I understand
> if it takes a disproportionate amount of code.
>
> (Would it be possible to tell JCommander to convert "-" to "_" and lower
> case to upper case before trying to match these enums? That would solve
> both this issue and the "lower case constant" problem.)
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/kframework/k/pull/309/files#r11219706>
> .
>