Re: const correctness
От | Robert Haas |
---|---|
Тема | Re: const correctness |
Дата | |
Msg-id | CA+Tgmob0kzqwjXtsJS6aihwJUMVyDWiAH0BkiKTUA343d3xyTg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: const correctness ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Ответы |
Re: const correctness
|
Список | pgsql-hackers |
On Wed, Nov 9, 2011 at 11:28 AM, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote: >> The kicker is that it's a lot of work for an unbelievably tiny >> benefit, sometimes a negative benefit. > > Assuming duplicate declarations with and without const are off the > table, where do you see the negative? If it doesn't uglify the code, there aren't any negatives. I'm just saying we may not be able to get very far before we run up against that issue. For example, in the OP, Thomas wrote: 7. I made a list_head_const function, which can be used used to get a pointer to the head cell when you have a pointerto const List; I needed that so I could make foreach_const and forboth_const; they were needed to be able to makelist_member, _equalList and various other list-visiting functions work with const List objects. So that's already duplicating list_head, foreach, and forboth. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: