This often comes up: your application has gotten extensive enough that it's time to add some programmability into it to make it flexible. One example might be a finance application - you want to add a formula editor so that you can create your own custom formulas without having to re-compile the code.
You have to make a choice: do you create your own tokenizer, parser, and interpreter/compiler chain, something which might take a long time and might be done incorrectly? Or do you just embed another scripting language, which has the problem that it'll likely bloat your code and expose your app to security vulnerabilities.
How would you balance the trade-offs and make this decision?