
On Thu, Jun 10, 2021 at 11:50 PM Thomas Güttler <info@thomas-guettler.de> wrote:
Am Do., 10. Juni 2021 um 15:33 Uhr schrieb David Mertz <mertz@gnosis.cx>:
Strong -1
As others noted in prior discussion, even if this existed, it works be an anti-pattern for SQL. So basically, it's just baking in an HTML-only template language into the language syntax.
Python already had excellent HTML templating in libraries. The fact Django has a function with a long name just suggests importing it with a shorter name.
Python has many uses having nothing to do with web pages. This could make sense for PHP (does anyone use that still?). It's a poor for for Python.
PHP is very productive. The majority of sites are written in PHP.
The only thing which PHP has not: Respect.
It does not get respect since it is too easy.
Too easy to do things badly, that's why PHP lacks respect. It's not about how easy it is to quickly whip up a web site; it's about how easy it is to quickly whip up a really really bad web site, and how the design of the language encourages practices that tend towards that.
Python is getting pushed into the backend during the last years, while web frontend is mostly done in Javascript.
I think this is the wrong direction.
Together with tools like htmx (fragments over the wire), I would rather choose PHP than Javascript.
What's the advantage of htmx? When I want to build a good interactive web site, my general pattern is a back end with a well-defined API, and a front end in JavaScript that makes use of this API. That API is usually going to be based on either a RESTful (or roughly REST-like) JSON transactional system, or something like websockets, again carrying JSON payloads. HTML is the realm of the display, not the back end.
PHP is great for creating HTML. I know that the easy solution does not get much respect, but maybe you understand that making it easy to create HTML would be a major benefit for Python.
I actually like the idea, but this justification seems *extremely* weak. ChrisA