Choosing between functions and scripts