Re: [GnomeMeeting-devel-list] [PATCH] removes unneeded begin/end call notification in text-chat



On sam, 2004-01-24 at 17:40, Damien Sandras wrote:

> That's exactly the way it is currently in most cases.

Hmmm... src/common.h has quite a few exceptions...

> You will never see that. Global variables, even static, are considered
> as a very bad programming practice by many people, including me and I
> have put much effort to prevent that to happen.

What I described is not _global_. It is _local_: you don't have access
to the variables outside of the scope where they're used, and there's an
outside the scope.

On the contrary, variables in a struct that is declared globally, with a
function that gives access to it globally, are therefore _global_:
there's no scope where you can't access them.

I agree that global variables should be avoided at all cost.

> I know several projects using this, but my formation psychologically
> refrains me from doing so. I will be very clear about this :
> - either a GObject is used
> - or you define structures like it is now

I'll push things into shape as much as possible through the use of
structures if you wish so, since it will be a prerequisite for the clean
transition to a GObject anyway, if it happens.

> But you will never see semi-global static variables in any file of
> GnomeMeeting, because it is nearly as bad as GOTO programming.

Goto can be used for readability reasons. And can be used to make a
program unreadable.

Snark




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]