4 ms·
>Lisp is Turing-complete while StringTemplate doesn't. Well...C# String interpolation is.
by dahauns 9y ago
>Lisp is Turing-complete while StringTemplate doesn't.
Well...C# String interpolation is.
- garganzol 9y agoC# string interpolation is fast and preferable solution that works great at smaller scale (which is probably close to 99.99% of all use cases). Having said that, C# string interpolation is not user-configurable, and you cannot realistically use it to generate, say, 300 lines of highly sophisticated text that is a subject to frequent modifications during product development. One of the popular tasks for a larger scale templating is email generation. Text templates, HTML templates, for signup, for email confirmation, for password reset, for subscription renewal, for ... you name it. As you can see, it quickly goes wild. Not sure one would prefer string.Format() or C# string interpolation to do all of that.
- dahauns 9y agoAh...! Sorry, I misunderstood you there. (Ok,ok. I admit I only skimmed your reply :) ). But why would you want Turing completeness in a user facing templating engine? This is generally considered harmful, leading to all kinds of maintenance horrors. (And that's why StringTemplate deliberately isn't.)
- mattmanser 9y agoErr, or just use Razor cshtml?