#104 closed defect (fixed)
Meaningless parameter in ArgParser::boolOption()
Reported by: | Balazs Dezso | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | minor | Milestone: | LEMON 1.0 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
Usually, the value parameter is used to add a default value for a argument. However in the boolean case, if this parameter is set true, then the argument will always true, because false argument cannot be given from command line. So, I think this parameter is meaningless in this context.
Attachments (3)
Change History (14)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
Status: | new → assigned |
---|---|
Version: | → hg main |
Changed 16 years ago by
Attachment: | arg_parser_doc_eea4295af4ad.patch added |
---|
comment:3 follow-up: 4 Changed 16 years ago by
I uploaded a patch of doc improvements for ArgParser?.
comment:4 follow-up: 5 Changed 16 years ago by
Replying to kpeter:
I uploaded a patch of doc improvements for ArgParser?.
The changeset [eea4295af4ad] contains very long lines. We should stick on the 80 character upper limit. (And probably it should also be explicitly written in the coding conventions.)
comment:5 follow-up: 6 Changed 16 years ago by
Replying to alpar:
We should stick on the 80 character upper limit. (And probably it should also be explicitly written in the coding conventions.)
I am not really sure. In most cases we should keep this limit, but sometimes using long lines seems to be a better choice, since it results more clearly arranged code, especially in test/demo files.
Do you have any idea to make this changeset better without losing the line comments?
comment:6 Changed 16 years ago by
Replying to kpeter:
Replying to alpar:
I am not really sure. In most cases we should keep this limit, but sometimes using long lines seems to be a better choice, since it results more clearly arranged code, especially in test/demo files.
In no way. Broken lines are much more difficult to read and long line can be avoided.
Vast majority of projects treat it as a strict requirement and we should do so as well.
Do you have any idea to make this changeset better without losing the line comments?
Some ideas:
- Use less spaces
- Break the lines
- Use doxygen comments outside the source code like in case of grapg_orinentation.cc. It results in a documentation which is pleasant to read.
comment:7 follow-up: 8 Changed 16 years ago by
[1767a4db2b8c] is almost the same as [eea4295af4ad], but it does not contain long lines.
comment:8 follow-up: 9 Changed 16 years ago by
Replying to kpeter:
[1767a4db2b8c] is almost the same as [eea4295af4ad], but it does not contain long lines.
Unfortunately, it does not compile.
comment:9 Changed 16 years ago by
comment:10 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Replying to deba:
Yes it is. What is more, the last parameter (
obl
) doesn't make sense either. But this way of design was intential, for two reasons.