Re: [gtk-list] Re: Need help in GTK-project

You really ought not to be having a lot of global variables lying around 
anyway.  That's poor practice in and of itself.  You are begging for
namespace collisions.  Much nicer to provide functions to access your
data (and use some sensible naming convention).  Then you can use ctags
to jump right to the function, you don't have to worry about stomping on 
other variables, and you can completely change the implementation as
long as you leave the interface the same.

On Sat, 11 Dec 1999, John C
Atkeson wrote:

> >>
> > Why do I need a headerfile for this?  Sorry to ask such stupid
> > questions, but this is my first BIG program... at school al always
> > learned to program in just one .c file and that was quite stupid I
> Are you serious? It's really bad programming practice.
> <<
>   Eh, not that bad.
>   It's a tradeoff, modularity is good, but 50 source files can be a lot
> harder to maintain than 5. 
>   E.G. renaming (or just finding) a variable is much easier with a
> minimum of files.  (Notice how the best tutorial examples are only 1
> piece of code?  Programs are written to be read by people... If not, they
> go extinct.)
>   John
> ___________________________________________________________________
> Why pay more to get Web access?
> Try Juno for FREE -- then it's just $9.95/month if you act NOW!
> Get your free software today:
> -- 
> To unsubscribe: mail -s unsubscribe < /dev/null

  Rob Huffstedtler             Please visit Linux University 
  (931) 596-3560        

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