in reply to Smart match & substitution
Spaghetti code is when code jumps back and forth in a difficult to understand manner... what you've shown is not it. I see no particular problems with your code (other then it being kind of nonsense... maybe show something more real?)