News for hackers. Stuff that matters.
Re:Swift System Is Now Open Source by pansa2 on Friday September 25, 2020 @08:16PM (#24595356)
> escaped opening parens as identifiers for string templates

Do you mean the use of “\(variable)” for string interpolation? What’s wrong with that?

Re:Swift System Is Now Open Source by cutler on Saturday September 26, 2020 @03:45AM (#24597113)
It's just downright clunky. What's wrong with ${variable} as in Kotlin and Javascript?
Re:Swift System Is Now Open Source by Someone on Saturday September 26, 2020 @09:52AM (#24598863)
I 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.

Re:Swift System Is Now Open Source by mantap on Saturday September 26, 2020 @05:52AM (#24597586)
They 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.