On Mon, Nov 10, 2008 at 09:25:03AM +0000, Johan Sundstr�m (Achtung Liebe!) @ Pike (-) developers forum wrote:
Code being primarily written for people to read and only incidently for computers to execute, your variable choice could still be right for you, of course, but you should of course also be informed about consequences of design rather than blindly assuming it's ideal code.
absolutely, and to that extent i am very happy with the answers.
but that's only the first step. in keeping with the maxime of trying to make the most natural way to write the code also be the best optimized i like to push for improvements, so the next step is to explore how this situation can be improved.
i don't think there are many cases where more complex code (from a writers perspective) is better than simple code so i think it is worth the effort to identify all of these cases and eventually try to eliminate them.
for this case improving 'constant' seems very promising, especially because that has been discussed and considered for other reasons too. (general better typing of constants)
greetings, martin.