[Gegl-developer] Speeding up/documenting the gegl code

Nicolas Robidoux nrobidoux at cs.laurentian.ca
Sat Sep 13 05:41:50 PDT 2008


(Forgive me for preaching, done from the vantage point of a very stubby soapbox.)

One thing which I would not mind seeing throughout the gegl code is the systematic use of the const keyword.

My understanding is that the const keyword can also be used effectively to indicate to the compiler that
it can optimize without worrying about aliasing (of course, if the object is not const, the restrict keyword
is the only weapon).

If is also good for documentation, because it allows one (me!) to find out easily which arguments can be changed
by a function. (Akin to "classical" fortran subroutine documentation: declare the input arguments first, then 
the arguments which are both input and output, then those which are strictly output.

About const correctness:

http://www.cprogramming.com/tutorial/const_correctness.html


More information about the Gegl-developer mailing list