using integer type to define pins, why?

nixxit:
why do all the examples use variables to define pins? Is this a wast of RAM? isn't it slower than a constant?
My thinking is if you use the later the code wont have to GET the value from ram, guess its a compromise between ram and program memory?

This comes up often. Using int for pins and other minor issues in the examples are because they were written by humans.

retrolefty:
Are you sure you are not mixing up const with #define statements? A const still takes up space, it just tells the compiler to treat it as a read only value.

As other threads have proven before, this is not always true. avr-gcc will treat a const declarations as a "constant" whenever it can. Variables declared const or with #define end up taking up the same amount of SRAM.

See this thread: http://arduino.cc/forum/index.php/topic,86800.0.html