[Development] Qt Playground - Command Line Parser experiment
marius.storm-olsen at nokia.com
marius.storm-olsen at nokia.com
Mon Mar 12 21:06:22 CET 2012
On 08/03/2012 17:36, ext Laszlo Papp wrote:
> It is not a separate module, but class(es). The name for this
> experiment, in playground, would be something like "Command Line
> Parser". According to the regulation: if nobody objects to this
> addition from the beginning, I need to get the support of one
> existing module maintainer in order to be able to experiment with
> this feature in playground.
Like Ossi said, normally this would just be a feature branch, due to
their natural fitting into existing modules. However, this case is
special. See below.
> Either way, please let me know your thoughts. Thank you in advance!
It has been a long tradition inside Trolltech, and later Qt Development
Frameworks that all new employees come with a bright idea to implement a
command-line parser. After all, the Qt framework doesn't come with any,
so it must certainly somehow have been forgotten.
Not so. We probably have 10-12 command-line parsers developed throughout
the years, but none of them have ever been included in the product.
Mostly because either,
a) The parser is too trivial and doesn't handle the normal levels of
complexity of command line arguments out there. (tar, find, zip, and
standard Qt (built-in) arguments anyone?)
b) The parser is too complex, where it doesn't live up to the simplicity
expected from Qt API and usage.
c) The parser only focuses on the "standard" for a single platform.
(Linux users will not go for Windows style /? options, and Windows users
won't accept --help Linux options, etc)
The problems with writing a parser like this is to make it general
enough to support most of the Qt users, to justify it being part of the
core set of modules. If it doesn't, it probably shouldn't be in QtBase,
and as such should be a separate Addon, IMO.
Anyways, something to keep in mind when working on your implementation.
It's a can of worms with *a lot* of bikeshedding ;)
Good luck!
--
.marius
More information about the Development
mailing list