News for hackers. Stuff that matters.
Re:Python f-strings are the best syntax sugar i never knew a... by EnderMB on Thursday January 25, 2018 @12:58PM (#16232906)
I've only recently started learning Python, and the f-strings remind me a bit of the syntactic sugar provided by C# for string.Format() (var str = $"Hello, my name is {name}."; // for those who care)

I get the same feeling as well, and it's something I noticed a lot when it was a new feature to C#. Suddenly, everyone abandoned string.Format() in favour of $"", even when the code would lose a lot of readability.

Syntactic sugar is good and all, but I find it better to be more verbose for the sake of clarity.

There are no comments on this comment yet.