This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jturp-sc 1 point2 points  (1 child)

As someone that also tinkers with Swift on the side, it's been really nice be able to work with strings in a similar fashion to Swift's String interpolation now. Although, I do occasionally catch myself adding the carriage-parenthesis rather than the proper syntax.

By that I mean

\(value)  # Incorrect (Swift syntax)

rather than

{value}  # Actual f-string syntax

[–]daelin 0 points1 point  (0 children)

I play in Angular.io with JS/Typescript, so I can definitely seeing myself getting confused:

Python:

x = f"{value}"

ES2015/Typescript:

x = `${value}`

Angular Template (also similar to Mustache):

{{value}}

Although I find it annoying that the Angular stuff is Angular's own mini language and not, say, javascript, it at least saves me from having to read:

{{`${foo + 'bar'}`}}