| Share this post! | Vote this! |
|
Static is one of C's mysteries. It is odd because it has two completely
unrelated uses. This is quite the little puzzle for a language learner. Although many books write about static functions and static variables
very few actually explain when and how to use them-- or more importantly
why they were included to begin with.
The audience can take at least 2 things from guide. First-- I hope the audience is able to use better encapsulation in C. Second, I hope the audience feels comfortable using static functions.
Encapsulation:
Before we dive into the two meanings of static we should understand a little about encapcsulation first. Encapsulation basicly states we should limit the scope of our functions and variables. By limit the scope-- we essentially mean each variable and function should be give only the minimum visibility it needs to do its job. more...
The audience can take at least 2 things from guide. First-- I hope the audience is able to use better encapsulation in C. Second, I hope the audience feels comfortable using static functions.
Encapsulation:
Before we dive into the two meanings of static we should understand a little about encapcsulation first. Encapsulation basicly states we should limit the scope of our functions and variables. By limit the scope-- we essentially mean each variable and function should be give only the minimum visibility it needs to do its job. more...




0 comments:
Post a Comment