3 ms·
> but can't they use a symbol before the string like they do with interpolation `$` or literals `@`? Hi! I'm the language designer here :) I know it says des
by Metasyntactic 5y ago
> but can't they use a symbol before the string like they do with interpolation `$` or literals `@`?
Hi! I'm the language designer here :)
I know it says design decision to go with 1 more " than the longest sequence of " in the string, but why ?
Because if we use a symbol before the string, then there needs to be some mechanism to escape it within the string. e.g. if you use `@` literals, you still need to escape quotes within the string literal. The point of this feature (which we try to spell out in the spec) is so that you can have content without the need to escape anything at all.