Sure, userDefined doesn't come from a string, and cannot be transported as data, but there are many templating libraries with different features available in userland already to solve this with either eval (very powerful, but also a security issue) or fixed pattern grammars (more secure, but more restricted, and very heterogenous). I do not believe there is one golden solution that would fit all requirements and be useful as a builtin.