Opened 16 years ago
Closed 16 years ago
#116 closed defect (fixed)
ArgParser should be cleaned
Reported by: | Balazs Dezso | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.0 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: |
Description
There are some public member functions which takes to iterators, which iterators should be refer to a private container. These member functions should be private in these class.
In addition, some member function should be const. For example files(), showHelp(), given(), operator[]()...
Attachments (1)
Change History (7)
comment:1 Changed 16 years ago by
Version: | → hg main |
---|
Changed 16 years ago by
Attachment: | 60eecd3fe37a.patch added |
---|
comment:2 follow-ups: 3 4 Changed 16 years ago by
Status: | new → assigned |
---|
comment:3 follow-up: 5 Changed 16 years ago by
Replying to alpar:
The
const
specifier was invented directly by the Evil. The more I must use it, the more I hate it.
Maybe Stroutstup is the Evil... However, I thought that the const
come from C, but I should realize that it is a real C++ feature, and the C just acquired from C++.
Anyway, [60eecd3fe37a] is an attempt to solve the problems indicated in the ticket. How do you like it?
In my opinion, the patch can close the ticket.
comment:4 Changed 16 years ago by
Replying to alpar:
Anyway, [60eecd3fe37a] is an attempt to solve the problems indicated in the ticket. How do you like it?
I think it's okay.
comment:5 Changed 16 years ago by
Replying to deba:
Replying to alpar:
The
const
specifier was invented directly by the Evil. The more I must use it, the more I hate it.Maybe Stroutstup is the Evil... However, I thought that the
const
come from C, but I should realize that it is a real C++ feature, and the C just acquired from C++.
It is not true. At least it I'm sure there is not a single word about const
in the Kernighan-Ritchie book. Moreover the very first hit for "const in c" in google says
"idea of const has been borrowed from C++"
On the other hand, the concept of const
becomes complete (I mean completely stupid and annoying) with the const
functions and const_iterator
s, which are missing from C.
Anyway, my major problem is not that the const
is completely useless for preventing bugs, but the fact that placing a single const
somewhere makes it necessary to put new const
specifiers everywhere in the code. If the compiler is clever enough to make a conclusion that a function declared const
attempts to change something, why it cannot notice if a function without a const
specifier does not modify anything?
comment:6 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The
const
specifier was invented directly by the Evil. The more I must use it, the more I hate it.Anyway, [60eecd3fe37a] is an attempt to solve the problems indicated in the ticket. How do you like it?