2 ms·
> print($"My name is ^(@name).") > > I don't understand why anyone would still require special notation for interpolated strings, when we have the awesome a
by Nullabillity 10y ago
> print($"My name is ^(@name).")
>
> I don't understand why anyone would still require special notation for interpolated strings, when we have the awesome and unambiguous string interpolation syntax introduced by Swift (granted, this project was started in 2011, before Swift).
Why should the swift syntax be considered the default now? "My name is $blah." has been the de-facto standard for ages.
Personally I like interpolation sigils since in most cases you don't actually use it, and languages like Scala allow you to define custom sigils with custom behaviour. For example, Slick defines a sql"SELECT * FROM table WHERE username=$username" syntax that does not cause SQL injection issues.