▲ | kazinator 8 days ago | |||||||
On the contrary, I implemented a substantial facsimile of it in a Lisp dialect yesterday; see my comment history.
Unlike template strings, it was done in the language. There already are quasi-strings in the form of `...` syntax. We can quote that syntax (e.g. implicitly as a macro argument) and then pull apart its pieces to construct an object. It should work even in a years-out-of-date installation of the language. No new tooling is required; no changes to syntax highlighting in the editor, nothing.It's a parlor trick that doesn't have any uses. The structured log messages use case is the most promising, because it has a consumer which actually wants the interpolated pieces that it would otherwise have to hackily parse out. I predict that Python will eventually get dedicated HTML syntax: perhaps something that uses indentation to indicate element nesting. Let's "vibe pseudocode" a sketch:
or whatever. | ||||||||
▲ | pphysch 8 days ago | parent [-] | |||||||
> Unlike template strings, it was done in the language. This is a disingenuous way to compare a LISP with a language that values syntactic convention and strives to be readable and maintainable by more than one person. > I predict that Python will eventually get dedicated HTML syntax: How do you assign this result to a variable? How is this any better than
| ||||||||
|