learning dragonfly or C...

Jonas Sundström jonas at kirilla.com
Thu Nov 11 16:29:36 PST 2004

Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
> :>	struct fubar * blah;
> :>	struct fubar *nblah;
> :>
> :>	getmafubar(&nblah);
> :>	blah = nblah;
>     Nope.  Ok, I'll tell you... it's so the compiler can 
>     optimize 'blah' into a register.

Cool discussion, though this a much later issue for
most coders, let alone those just starting to learn C.

Random link:

One part of programming that could use a lot more effort is writing 
readable code, so that it actually makes sense to someone not familiar 
with it. (Or one self, a week later.) Choosing descriptive names for 
variables as opposed to names 1 or 2 chars long does a lot for 
readability. (Not meant as criticism of any code shared here.)

Another random link:
"Best practices for programming in C"

Another one:  
"Comments on Comments"

BTW, do long/short variable names matter at all for performance in C 
and C++? And what about function- and class method names?

/Jonas Sundström.                    www.kirilla.com

More information about the Kernel mailing list