[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: string formatting notation



> Actually there are other things in SCLang that annoy me a lot more than
> string interpolation, but I won't hijack the topic :)

Feel free to start another thread! I'm interested to hear.

On Fri, Dec 22, 2017 at 8:47 AM, <stefaan.himpe@xxxxxxxxx> wrote:
brianlheim wrote
> 1. Do you agree string formatting and/or string interpolation could be
> done
> better in SC?
> 2. What are some ways we could make it better that would be less harmful
> than the % approach?

For me personally, the % approach feels like setting a step back in
readability from .format. Note that also python added .format after they had
% for a long time (why? because % is less flexible:
https://www.python.org/dev/peps/pep-3101/#rationale ).

More recently python added literal string interpolation (also known as
"f-strings") that I find more convenient to use because they don't require
me to rewrite sentences "in % word order" % ["garbled"]
https://www.python.org/dev/peps/pep-0498/

Actually there are other things in SCLang that annoy me a lot more than
string interpolation, but I won't hijack the topic :)