[PATCH] D156429: [TableGen] Add new bang operator !format

Paul C. Anagnostopoulos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 05:44:17 PDT 2023


Paul-C-Anagnostopoulos added a comment.

In D156429#4541461 <https://reviews.llvm.org/D156429#4541461>, @simon_tatham wrote:

> In D156429#4539852 <https://reviews.llvm.org/D156429#4539852>, @Paul-C-Anagnostopoulos wrote:
>
>> Would it be better to use a specific character as the escape character, rather than doubling the braces? For example, ``{` and ``}`
>
> That's probably how I'd do it if I were designing a formatting/interpolation syntax from scratch. But in the case where two major languages already agree on a syntax looking very like the one we're adopting here, I'd say that a more important concern is to avoid being confusingly similar-but-incompatible.

But in the case of Python, there is also a new string prefix. I don't know about other languages. Anyhoo, as long as we're convinced we won't eventually be doubling a third and fourth character (incompatibly), then I suppose it's okay. I like the extensible solution of a quoting character.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156429/new/

https://reviews.llvm.org/D156429



More information about the llvm-commits mailing list