>Yes! Please, for the love of all that is holy, please quit writing tools that make me write code in something that isn't a general purpose programming language! Didn't we learn from Ant and xml?
Yes, we learned to use less powerful languages where it was appropriate because they're more readable and less susceptible to technical debt.
Ant XML was as powerful as Java - it was turing complete and terribly designed to boot. That was its primary failing.
Likewise, using turing complete PHP to generate HTML was never as clean as using a less powerful templating language (like jinja2) to generate the HTML. Separation of concerns with a language barrier is a good thing.
If all of this means nothing to you, you've probably created some huge code messes in your time.
> Likewise, using turing complete PHP to generate HTML was never as clean as using a less powerful templating language (like jinja2) to generate the HTML.
I strongly agree with your point, but Jinja2 is Turing Complete as well (it's still preferable to PHP though).
I don't really know enough computer science to validate this idea, but I can sense that there are different levels of "power" among turing complete languages (and also among non-turing complete languages). And Jinja2 < Python/PHP, despite all three being turing complete.
Metaprogramming / C++ style templating, for instance, goes above and beyond the power provided by regular turing complete programming constructs, and while that means that you can do cool stuff with them you couldn't easily do otherwise, they're a massive headache to reason about, debug, and keep free from technical debt.
Similarly, when you take blocks of code and "lower the power" to make it declarative instead of imperative (e.g. using list comprehensions instead of for loops) it almost inevitably ends up cleaner.
Yes, we learned to use less powerful languages where it was appropriate because they're more readable and less susceptible to technical debt.
This principle, in other words : https://en.wikipedia.org/wiki/Rule_of_least_power
Ant XML was as powerful as Java - it was turing complete and terribly designed to boot. That was its primary failing.
Likewise, using turing complete PHP to generate HTML was never as clean as using a less powerful templating language (like jinja2) to generate the HTML. Separation of concerns with a language barrier is a good thing.
If all of this means nothing to you, you've probably created some huge code messes in your time.