RE: [gnome-db] Patch for const removal
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Murray Cumming Comneon com
- Cc: paisa unt edu, malerba gnome-db org, GDA <gnome-db-list gnome org>
- Subject: RE: [gnome-db] Patch for const removal
- Date: Wed, 19 Nov 2003 13:14:31 +0100
On Wed, 2003-11-19 at 12:17, Murray Cumming Comneon com wrote:
> > It's not about "let's do it like the cool guys", but "let's
> > fix it", and I think we all agree the const's in those files
> > are wrong, even if it's the correct fix semantically speaking.
>
> Even in C++ it is impossible to use consts correctly according to any rule.
> It depends on what you want the const to mean, and the compiler can not
> enforce even what you want to mean. For years I thought that it could.
> Ref-counting is a good example of this - If I ref it, am I changing it?. You
> get to decide, not the compiler.
>
> And it's even more difficult in C. If it works, and it doesn't seem
> illogical in the API then I think it's OK.
>
> The only consistent and workable use of const that I have seen in GNOME is
> on gchar* parameters. Anything else might lead to problems.
>
right
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]