4 ms·
It's just downright clunky. What's wrong with ${variable} as in Kotlin and Javascript?
by cutler 6y ago
It's just downright clunky. What's wrong with ${variable} as in Kotlin and Javascript?
- mantap 6y agoThey had good reasons, it means there's only two substrings that need escaping: the backslash and end string sequence. In hindsight, it's ugly and hard to read. A case of optimising for the wrong thing.
- Someone 6y agoI think that’s more a question of taste/what one is used to. I find that dollar sign a bit heavy, visually, but one could also argue that’s a plus. Using backslash has the advantage that there’s only one ‘special’ character in strings, but of course, also has the problem can escape any character with a backsplash, except for opening parentheses.