|
Boost : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-01-21 01:48:57
[2003-01-21] David A. Greene wrote:
>Vladimir Prus wrote:
>
>>> I have one policy that I forgot to mention: chain_lookup_policy. It's
>>> work
>>> is based on Chain of responcibilities Design pattern. In this case Every
>>> parameter knows how to parse itelf out of input. And this
>>> identification may
>>> not be the name at all.
>>
>> I would say that it's a big question how much flexibility is needed. My
>> position is that the command line should not go beyond existing styles.
>> Can you suggest some style which require chain_lookup_policy and still
>> legible for users?
>
>If I understand what Gennadiy is saying, then I have a possible example.
>Our compiler has options that look something like this:
>
>-fcopyPropagation={--maxTransforms=32 --keepStats}
>
>Nobody but the CopyPropagation module should care about what's in
>the braces. "-f" knows enough to parse a filter name ("copyPropagation"
>in this case). These constructs can be arbitrarily nested. One of our
>modules goes three deep, IIRC.
Not totally sure if this is in context, haven't really followed this thread.
But my command lines are rather complex and context dependent. For example
here are some of them...
registerCommand(L"copy")(L"[from]")(L"<asset>")(L"[revision=<revision>]")(L"here")(L"[preserve|overwrite]")
registerCommand(L"copy")(L"[from]")(L"<asset>")(L"[revision=<revision>]")(L"[to]")(L"<asset>")(L"[preserve|overwrite]")
registerCommand(L"edit")(L"[label=<label>]")(L"[set]")(L"comment=<comment>")
registerCommand(L"edit")(L"[label=<label>]")(L"[add]")(L"{<pattern>}")(L"[last|published]")
... [] = 0 or 1, {} = >1, <> = replacement, | = alternates, everything is
literals.
In other words, not everyone uses GNU style CLI. Some of us like AmigaOS
style CLI ;-)
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk