3 ms·
Hi, I'm the lang designer here. We looked into this. However, there didn't seem to be any benefit to this above just the N-quote version (which fits into how
by Metasyntactic 5y ago
Hi, I'm the lang designer here.
We looked into this. However, there didn't seem to be any benefit to this above just the N-quote version (which fits into how C# does strings everywhere else). In the above case, the `SQL(` and `)SQL` tokens are just akin to N-quotes. Since there's no additional benefit, we went with the simpler approach that solves all these needs, but will look the same across all codebases.
- brandmeyer 5y agoConsistent use of language-specific tags makes it easier for tools to switch to a dedicated foreign-language parser when they encounter a tagged raw literal. The host language just provides the capability through arbitrary matchup, but its still up to users and tool authors to use them consistently. SQL is just one example. Embedded shader programs, XML (fragments), and Protobuf literals are other possibilities.