Re:PEP 750 – Template Strings (t-strings) have been accepted
by nsonha on Thursday April 10, 2025 @08:14PM
(#43649180)
also a syntax for braces that looks like escaping
Re:PEP 750 – Template Strings (t-strings) have been accepted
by dionian on Thursday April 17, 2025 @09:52AM
(#43716868)
Yeah, that almost bothers me more than "STR."
Re:PEP 750 – Template Strings (t-strings) have been accepted
by Symbiote on Monday April 21, 2025 @03:13AM
(#43749164)
\{ is currently invalid syntax in Java, so it can be given a meaning.
${ is valid syntax (the string value "$\") so giving it a new meaning would break existing programs. That's not acceptable.
Re:PEP 750 – Template Strings (t-strings) have been accepted
by paulddraper on Thursday April 10, 2025 @09:37PM
(#43649624)
Yeah, I hate to bikeshed, but this is the worst syntax possible without being a full-out prank.
STR."Hello \{this.user.firstname()}, how are you?\nIt's \{tempC}°C today!"
compared to scala
s"Hello ${this.user.firstname()}, how are you?\nIt's ${tempC}°C today!"
STR."" ? really?