RE: reconsider use of _ prefix for struct tags?
- From: eric b lemings lmco com
- To: gtk-devel-list redhat com, darin eazel com
- Subject: RE: reconsider use of _ prefix for struct tags?
- Date: Tue, 11 Jul 2000 11:07:00 -0600
> ----------
> From: Darin Adler
> Sent: Tuesday, July 11, 2000 10:17 AM
> To: Gtk Developers
> Subject: reconsider use of _ prefix for struct tags?
>
> Is there a good reason to continue using a _ prefix for all struct tags in
> GTK+ and GNOME? The use of a _ prefix is technically illegal (they are
> reserved for the ISO C library and C implementation).
>
I believe the original intent was to indicate private and incomplete
structures. (Yeah, it's technically illegal but LOTS of programmers do it
anyway probably because it's always been done that way.) In GLib, Gtk+, and
Gnome, this convention is perhaps incorrectly used for public structures
also.
> I don't see any
> advantage to having a struct tag and a typedef with distinct names, but
> perhaps I'm missing something.
>
New code could (should?) drop the underscore but the convention is used
extensively in existing code. Unless existing code needs to be modified for
some other reason, there's no real benefit. That's about the only problem I
see with using the proposed convention.
Eric.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]