Hi Damian —

We've talked about a similar-but-different feature in which there would be some way to register a single-character / short-form flag of a config without requiring the config within the source text itself to be a single character. So, for example, you might imagine something like:

        config const objName: string = baseName + ".o";  // flag: -o

as a means of permitting any of:

        --objName myObjName.o
        --objName=myObjName.o
        -o myObjName.o
        -omyObjName.o

to set 'objName'. However, specifying such things via comments seems not-so-great, and nobody's come up with a proposal that's stuck (or needed it badly enough to wrestle further with it.

Another approach might be to make it a bit more procedural within the text of the program, like:

        const const objName: string = basename + ".o";
        ...
        registerShortFlag('o', objName);

-Brad


On Fri, 24 Jul 2020, Damian McGuckin wrote:


How difficult is it to interpret

        -Nv
as
        --N=v

where N is a single letter 'config const'?

This allows a Chapel program to be called as

        name [-tValue] [-aThing] ....

which is simpler that the almost GNU long argument syntax as now.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer


_______________________________________________
Chapel-developers mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_chapel-2Ddevelopers&d=DwICAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=QUQW-BniEL_d2a7btR4rP5TPiNmpm1pG-Qa_xXzGVKc&m=A2RhVclwjhupUzPbGVR5BLQGQvarhdK3cOxBY6FjqDQ&s=QTYU75H88NdUKUHjPJwcTPQVeblviU25W1hsAoY1VlQ&e=
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to