Re: reconsider use of _ prefix for struct tags?
- From: Kaz Kylheku <kaz ashi footprints net>
- To: Havoc Pennington <hp redhat com>
- Cc: eric b lemings lmco com, gtk-devel-list redhat com,darin eazel com
- Subject: Re: reconsider use of _ prefix for struct tags?
- Date: Tue, 11 Jul 2000 11:08:13 -0700 (PDT)
On 11 Jul 2000, Havoc Pennington wrote:
> Date: 11 Jul 2000 13:59:57 -0400
> From: Havoc Pennington <hp@redhat.com>
> To: eric.b.lemings@lmco.com
> Cc: gtk-devel-list@redhat.com, darin@eazel.com
> Subject: Re: reconsider use of _ prefix for struct tags?
>
> eric.b.lemings@lmco.com writes:
> > 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.
> >
>
> I don't see any benefit to changing new code, then you just lose
> consistency, and one of the big benefits of the glib/GTK codebase is
> that it has pretty good consistency.
>
> It's not a problem in practice; it's a purely theoretical problem.
> Most C implementations seem to use __ instead of _ for private stuff
> anyway.
False on both counts. There is nothing theoretical about a name clash,
and C implementations do use single underscores in places where that's
enough to enter a reserved namespace.
Try this: cd to your /usr/include directory and run
grep '\<_[a-z][0-9a-zA-Z_]*\>' *.h */*.h | less
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]