Trying out some template programming for generating evaluation code.